Just wanted to clarify more:
I am using this class as part application which carries real time information to time table displays at bus stops over UMTS / GSM network.
If I remove the exceptionListener and the special settings of connectionFactory from my code, it takes (I think) about 90 seconds until the client notices possible connectivity issues at the network connection. If the network connectivy comes back before the 90s limit, the consumer is already gone,
it never receives new messages from the server.
Can I somehow tell to the underlying session that I want my consumer back instead of recreating it?
The producer seems to be alive and kicking after network failure....That makes me wonder.
Any comments welcomed.
If I remove the exeptionListener and reCreateComsumer method and simply initialize the connectionFactory like this
Am I doing wrong if I expect that the client will try reconnect forever under any circumstances and after connection has been re-established both the consumer and producer will work?
I am having difficulties in finding any info about reusing the connection, session, consumer and producer over single connection.
I ealier ran the consumer and producer on separate threads and simply closed and reopened the connections on any exception, which is somewhat stupid approach, I think...
Did you look at the confirmation window size for reattachments?
I Did not realize this, althouhg red the chapter 34.1 several times:
Setting this parameter to -1 disables any buffering and prevents any re-attachment from occurring, forcing reconnect instead.
The default value for this parameter is -1.
What would be reasonable value for the window size?
What happens if failure is longer than the ConnectionTTL / ClientFailureCheckPeriod, Should I then do something manually or just wait until everything works again.