Skip to content

Conversation

@l4mby
Copy link
Contributor

@l4mby l4mby commented Jul 8, 2025

This PR adds stream support for consumer, the consumer now can be declared as such:

const consumer = await connection.createConsumer({ 
  stream: { 
       name: "some-stream",       // mandatory
       offset: Offset.first(),            // optional
       filterValues: ["invoices", "orders"],  //optional
       matchUnfiltered: true         // optional
  },
  messageHandler: (context, msg) => /* ... */ })

We also added support for filterValues.
Note that if both offset and filterValues are not defined the client will throw an error, since to use message filtering at least one parameter is needed.

@l4mby l4mby linked an issue Jul 8, 2025 that may be closed by this pull request
@l4mby l4mby force-pushed the 35-as-a-library-user-i-want-to-consume-messages-from-a-stream branch from f1e4595 to f389aaf Compare July 8, 2025 15:06
@l4mby l4mby marked this pull request as ready for review July 8, 2025 15:06
@l4mby l4mby merged commit f2d7864 into main Jul 9, 2025
4 checks passed
@apietroni51 apietroni51 deleted the 35-as-a-library-user-i-want-to-consume-messages-from-a-stream branch July 17, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a library user I want to consume messages from a stream

3 participants