You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used micro.go's RegisterSubscriber to register an event and passed server.SubscriberQueue as an opt. Unfortunately, I encountered an issue where, during rpcServer's Register (server\rpc_server.go:697), triggering s.HandleEvent for each s.subscribers occurs. However, within HandleEvent, ProcessMessage (server\rpc_router.go:511) triggers each subscription of router.subscribers again. This causes my subscriptions to receive duplicate messages.
For instance, I registered the same topic and used different Queues to differentiate, with corresponding handlers, h_a, h_b, h_c:
My handler, h_a, is triggered three times because each registration calls s.HandleEvent with s.subscribers, but the message is traversing router.subscribers again during ProcessMessage.
The text was updated successfully, but these errors were encountered:
Describe the bug
I used micro.go's RegisterSubscriber to register an event and passed server.SubscriberQueue as an opt. Unfortunately, I encountered an issue where, during rpcServer's Register (server\rpc_server.go:697), triggering s.HandleEvent for each s.subscribers occurs. However, within HandleEvent, ProcessMessage (server\rpc_router.go:511) triggers each subscription of router.subscribers again. This causes my subscriptions to receive duplicate messages.
For instance, I registered the same topic and used different Queues to differentiate, with corresponding handlers, h_a, h_b, h_c:
Then, when I publish this topic:
My handler, h_a, is triggered three times because each registration calls s.HandleEvent with s.subscribers, but the message is traversing router.subscribers again during ProcessMessage.
The text was updated successfully, but these errors were encountered: