Skip to content

Commit

Permalink
Fix MemQ non-clustered example to work out of the box
Browse files Browse the repository at this point in the history
  • Loading branch information
ambudsharma committed Jun 8, 2022
1 parent c8b4dd4 commit 50a789c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
25 changes: 7 additions & 18 deletions deploy/configs/nonclustered.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
logging:
level: INFO
appenders:
- type: file
currentLogFilename: /var/log/memq/memq.log
archivedLogFilenamePattern: /var/log/memq/memq-%i.log.gz
archivedFileCount: 10
maxFileSize: 100MiB
defaultBufferSize: 2097152
defaultSlotTimeout: 300000
cluster: false
openTsdbConfig:
host: 127.0.0.1
port: 18126
frequencyInSeconds: 60
awsUploadRatePerStreamInMB: 10
environmentProvider: com.pinterest.memq.core.config.LocalEnvironmentProvider
topicConfig:
- topic: TestTopic
- topic: test
ringBufferSize: 1024
outputParallelism: 50
outputParallelism: 4
batchSizeMB: 1
batchMilliSeconds: 1000
outputHandler: s3v2
outputHandlerConfig:
batchMilliSeconds: 50
storageHandlerName: devnull
storageHandlerConfig:
retryTimeoutMillis: 5000
maxAttempts: 2
disableNotifications: false
disableNotifications: true
bucket: <mybucket-name>
path: test/TestTopic
region: us-east-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public Thread newThread(Runnable r) {
MemqProducer<byte[], byte[]> instance = new MemqProducer.Builder<byte[], byte[]>()
.disableAcks(false).keySerializer(new ByteArraySerializer())
.valueSerializer(new ByteArraySerializer()).topic(topicName).cluster("local")
.compression(Compression.ZSTD)
.bootstrapServers("127.0.0.1:9094").build();
.compression(Compression.ZSTD).maxPayloadBytes(1024 * 150)
.bootstrapServers("127.0.0.1:9092").build();
StringBuilder builder = new StringBuilder();
while (builder.length() < 1024 * 512) {
while (builder.length() < 1024 * 100) {
builder.append(UUID.randomUUID().toString());
}

Expand Down

0 comments on commit 50a789c

Please sign in to comment.