Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
{ | |
"meta": { | |
"cta": { | |
"primary": { | |
"text": "See smallcases", | |
"action": "DISCOVER", | |
"query": "scids=SCAW_0001&scids=SCSB_0001&scids=SCSB_0003&scids=SCSB_0004", | |
"path": "/discover/all" | |
}, | |
"secondary": { |
const _ = require('underscore'); | |
const { query, model, operation } = offer.eligibility; | |
// the query is parsed because the query string in | |
// the offer document is an undercore string template where | |
// the variables can be replaced with the provided value | |
const parsedQuery = JSON.parse( | |
_.template(query)({ | |
brokeruserId: event.data.brokeruserId, | |
}) |
Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
const { ConsumerGroup } = require('kafka-node'); | |
const options = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
}; | |
const consumer = new ConsumerGroup(options, 'OrderTopic'); | |
consumer.on('message', (data) => { |
const { ConsumerGroup } = require('kafka-node'); | |
const options = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
fetchMaxBytes: 100 * 1024, // 100 KB | |
}; | |
const consumer = new ConsumerGroup(options, 'OrderTopic'); |
const { ConsumerGroup } = require('kafka-node'); | |
const options = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
fetchMaxBytes: 100 * 1024, // 100 KB | |
autoCommit: false, | |
}; | |
const consumer = new ConsumerGroup(options, 'OrderTopic'); |
const { ConsumerGroup } = require('kafka-node'); | |
const options = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
fetchMaxBytes: 100 * 1024, // 100 KB | |
autoCommit: false, | |
}; | |
const consumer = new ConsumerGroup(options, 'OrderTopic'); | |
consumer.on('message', (data) => { | |
consumer.pause(); |
const async = require('async'); | |
const { ConsumerGroup } = require('kafka-node'); | |
const consumerConfig = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
fetchMaxBytes: 100 * 1024, // 100 KB | |
autoCommit: false, | |
}; |
const async = require('async'); | |
const { ConsumerGroup } = require('kafka-node'); | |
const consumerConfig = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
fetchMaxBytes: 100 * 1024, // 100 KB | |
autoCommit: false, | |
}; |
const async = require('async'); | |
const { ConsumerGroup } = require('kafka-node'); | |
const consumerConfig = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
fetchMaxBytes: 100 * 1024, // 100 KB | |
autoCommit: false, | |
}; |