I have an application that uses WebSphere MQ to send data through WebSphere to a data center in Cloud. Part of the functionality is that if the subscriber on the server side detects that the message has not been received within 30 minutes, the flow is suspended for 5 minutes and the connection is deleted. When it reboots, it reconnects.
In practice, I found that disconnecting did not delete the subscription. When I try to reconnect, I see this error:
“There may be a problem creating the subscription because it is being used by another user of the message. Make sure message users using this subscription are closed before trying to create a new subscription with the same name. For more information, see Related an exception.
Indicates that the message handler is still connected, which means that the disconnect failed. Disable code for the XmsClient object (part of the library, although one of my colleagues may have changed it):
public override void Disconnect() { _producer.Close(); _producer.Dispose(); _producer = null; _consumer.MessageListener = null; _consumer.Close(); _consumer.Dispose(); _consumer = null; _sessionRead.Close(); _sessionRead.Dispose(); _sessionRead = null; _sessionWrite.Close(); _sessionWrite.Dispose(); _sessionWrite = null; _connection.Stop(); _connection.Close(); _connection.Dispose(); _connection = null;
Does anyone have any thoughts on why the link still exists?
c # ibm-mq
MrShoes
source share