-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
todoNext feature to implementNext feature to implement
Description
The user should be able to create a consumer attached to a stream
const consumer = await connection.createConsumer({
stream: {
name: "some-stream",
offset: Offset.first()
},
messageHandler: (msg) => /* ... */
})The user should also be able to add stream filtering
const consumer = await connection.createConsumer({
stream: {
name: "some-stream",
offset: Offset.first(),
filterValues: ["invoices", "orders"],
matchUnfiltered: true
},
messageHandler: (context, msg) => {
const filterValue = msg.annotations("x-stream-filter-value")
if (["invoices", "orders"].includes(filterValue) {
// process message ....
}
}
})Metadata
Metadata
Assignees
Labels
todoNext feature to implementNext feature to implement