[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-126 -- JMS expiration
by timfox
"weston.price(a)jboss.com" wrote :
|
| The DLQ handler is layered with a JBoss specific handler being called first to handle redelivery. First we check for the existence of the JMS_JBOSS_REDELIVERY_LIMIT and JMS_JBOSS_REDELIVERY_COUNT.
|
You mean JBoss MQ specific? JBoss Messaging doesn't have these properties.
"weston.price(a)jboss.com" wrote :
| If we can find the count we compare it againts the ActivationSpec property DLQMaxResent. If it's over the limit, the JBoss specific DLQ handles the message.
|
| If we don't execute the above, the GenericHandler kicks in. We try and check the JMSXDeliveryCount first. If it exists, all is well and we use that as a marker for re-delivery attempts.
|
| Now, heres the trick :-).
|
| If that property does not exist, we increment a counter based on the cached ID for that message. So, basically in order:
|
| JBoss specific
| Generic JMSXDeliveryCount
| Cached id/count mapping
|
So you maintain a map of id to count? How long do you keep items in the map for? It could grow pretty big. Also wouldn't survive restart I assume.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986878#3986878
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986878
19 years, 4 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Server side HA and failover (Repost)
by clebert.suconic@jboss.com
Tim wrote : ...why you think you need a ClusteredConnectionFactory...
- How would you as an user, decide if you want to use an HAConnection or not?
- The ClientConnectinFactory which is dealing with HA, is being called ClusteredClientConnectionFactory, and it aggregates ClientConnectinFactory[]. I will round robbing between the array of child factories.
Tim wrote : ...and why you need to replicate more than the locatorURI?
ClientConnectionFactory has also an equivalent ServerConnectionFactoryEndpoint, right?
Looking at properties from ClientConnectionFactoryDelegate:
| //... from superClass DelegateSupport:
| protected int id;
|
| //... from the class itself
|
| protected String serverLocatorURI;
| protected Version serverVersion;
| protected int serverID;
| protected boolean clientPing;
|
I would need to replicate at least the LocatorURI and the serverID and DelegateSupport::id, assuming serverVersion and clientPing won't never change.
Well... as I had to store almost everything, why not to take this into a real instance of ClientConnectionFactoryDelegate? It made much more sense for me.
Anyway... today I'm going to change ClusteredConnectionFactoryClient a lot today. I had created two classes:
One ClusteredClientConnectionFactoryDelegateServer and another ClusteredConnectionFactoryClient. The server version was supposed to use serialization replaceObject with the Client version updating the list of server from one PostOffice. This didn't work of course..
I will change the PostOffice to re-register the ClusteredConnectionFactory when the View changes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986862#3986862
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986862
19 years, 4 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Server side HA and failover
by clebert.suconic@jboss.com
Tim wrote : ...why you think you need a ClusteredConnectionFactory...
- How would you as an user, decide if you want to use an HAConnection or not?
- The ClientConnectinFactory which is dealing with HA, is being called ClusteredClientConnectionFactory, and it aggregates ClientConnectinFactory[]. I will round robbing between the array of child factories.
Tim wrote : ...and why you need to replicate more than the locatorURI?
ClientConnectionFactory has also an equivalent ServerConnectionFactoryEndpoint, right?
Looking at properties from ClientConnectionFactoryDelegate:
| //... from superClass DelegateSupport:
| protected int id;
|
| //... from the class itself
|
| protected String serverLocatorURI;
| protected Version serverVersion;
| protected int serverID;
| protected boolean clientPing;
|
I would need to replicate at least the LocatorURI and the serverID and DelegateSupport::id, assuming serverVersion and clientPing.
Well... as I had to store almost everything, why not to take this into a real instance of ClientConnectionFactoryDelegate? It made much more sense for me.
Anyway... today I'm going to change ClusteredConnectionFactoryClient a lot today. I had created two classes:
One ClusteredClientConnectionFactoryDelegateServer and another ClusteredConnectionFactoryClient. The server version was supposed to use serialization replaceObject with the Client version updating the list of server from one PostOffice. This didn't work of course..
I will change the PostOffice to re-register the ClusteredConnectionFactory when the View changes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986862#3986862
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986862
19 years, 4 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-126 -- JMS expiration
by weston.price@jboss.com
anonymous wrote :
| JBM itself needs it's own DLQ logic since we won't always have JCA. E.g. in the standalone server case.
|
Yep. Makes sense. So I wasn't too far off base.
anonymous wrote :
| BTW I'm unclear as to how you keep track of how many times delivery has been attempted in the JCA layer? JMSXDeliveryCount is an optional property not supported by all messaging systems, so if you rely on that your code won't necessary work with other messaging systems.
| anonymous wrote :
| |
| | The DLQ handler is layered with a JBoss specific handler being called first to handle redelivery. First we check for the existence of the JMS_JBOSS_REDELIVERY_LIMIT and JMS_JBOSS_REDELIVERY_COUNT. If we can find the count we compare it againts the ActivationSpec property DLQMaxResent. If it's over the limit, the JBoss specific DLQ handles the message.
| |
| | If we don't execute the above, the GenericHandler kicks in. We try and check the JMSXDeliveryCount first. If it exists, all is well and we use that as a marker for re-delivery attempts.
| |
| | Now, heres the trick :-).
| |
| | If that property does not exist, we increment a counter based on the cached ID for that message. So, basically in order:
| |
| | JBoss specific
| | Generic JMSXDeliveryCount
| | Cached id/count mapping
| |
| | Interestingly enough the two conditions you specify:
| |
| | anonymous wrote :
| | | a) A RuntimeException is thrown from onMessage and ack mode = auto ack or dups ok, retry is immediately attempted (in JBM code).
| | |
| | | b) Session gets closed before acking messages so messages are nacked back to the destination.
| | | anonymous wrote :
| | | |
| | | | should actually never occur in JCA land for the following reasons:
| | | |
| | | | a) I never propogate a RuntimeException from onMessage. Effectively I trap it and deal with it locally via Transaction demarcation.
| | | |
| | | | b)Sessions are never closed during delivery, only in the case where they have reached an idle timeout, or the adapter itself is being stopped.
| | | |
| | | | So, effectively it sounds like I am 'jumping in the way' of JBM DLQ. Of course you do redeliver in the case of a commit/rollback on either an XA or local JMS transaction but in this case the JCA DLQ handler would grab it because it is not one of the conditions above. At least that's how I have it in my head.
| | | |
| | | |
| | | |
| | | |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986861#3986861
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986861
19 years, 4 months