Run subscriberequest befor doing Notify?

14 views
Skip to first unread message

ErikZ

unread,
Jan 29, 2015, 3:27:36 AM1/29/15
to nginn-me...@googlegroups.com
Is there a way I can ensure that all subscriberequest is processed before calling Notify?

Thanks,
Erik

Rafal Gwizdala

unread,
Jan 29, 2015, 12:03:30 PM1/29/15
to nginn-me...@googlegroups.com
Hi Erik,
No, there's no guarantee that  NGinnBPM.MessageBus.Messages.SubscribeRequest (or UnsubscribeRequest) will be processed before other messages - it's just a normal message. Unfortunately, there's no API that would let you know whether there are any pending subscription requests or not.
There's a subscription renewal mechanism in place that relies on publisher asking the subscribers whether they want to continue being subscribed, but it activates itself after some time (24h i think).
One of possible solutions would be using static message routing instead of pub-sub, but i'm not sure if this is acceptable in your case.

Best regards
RG

--
You received this message because you are subscribed to the Google Groups "nginn-messagebus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nginn-messageb...@googlegroups.com.
To post to this group, send email to nginn-me...@googlegroups.com.
Visit this group at http://groups.google.com/group/nginn-messagebus.

ErikZ

unread,
Jan 30, 2015, 1:29:27 AM1/30/15
to nginn-me...@googlegroups.com
Thank you Rafal.

I didn't know about static routing. Interesting! :)
What if I use static routing and I specifies a queue that is not yet created? Is that queue created?

I like the idea of static routing, but maybe not the json-config-implementation. Since StaticMessageRouting implements ISubscriptionService I hope that I can inject my own implementation. How do I inject my own implementation?

Sincerly,
Erik

Rafal Gwizdala

unread,
Jan 30, 2015, 3:02:19 AM1/30/15
to nginn-me...@googlegroups.com
No, with static routing the destination queues will not be automatically created - currently the only way to ensure the queues exist is to create them during initialization, by calling MessageBusConfigurator.CreateQueueTable.
And regarding your own ISubscriptionService - you can register your own implementation in the Windsor container during initialization (do it somewhere at the beginning of setup, before calling FinishConfiguration)

RG
Reply all
Reply to author
Forward
0 new messages