Skip to content
Discussion options

You must be logged in to vote

Again, the Consumer or Producer instance is the resource from Context#resource(). If you set up a StateListener instance on e.g. a Consumer, it should always see the same consumer instance coming from Context#resource(). If you don't observe this, there is a bug somewhere. In this case, provide a standalone code sample that reproduces this behavior.

Of course if you have a shared StateListener instance between consumers and producers (that is you create a StateListener instance and use it when creating your consumers and producers), it will see different resources in its callback, that is perfectly normal.

According to the comment in your code, the current behavior should do what you expe…

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@acogoluegnes
Comment options

@pvaiko
Comment options

@pvaiko
Comment options

@acogoluegnes
Comment options

Answer selected by pvaiko
@pvaiko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants