[ 
https://issues.apache.org/activemq/browse/AMQ-895?page=comments#action_36879 ] 
            
Manuel Teira commented on AMQ-895:
----------------------------------

Previous error was produced by bug: 
https://issues.apache.org/activemq/browse/AMQ-901

Checking todays svn trunk version finished with a successful compilation. 
However, reconnection seems not to work. 

The scenario is as follows:

===Scenario #1===
ActiveMQ broker with a bridged Sun MQ Broker.
* Start ActiveMQ
* Send a message to a bridged queue.
** The message gets into the queue, the jmx console shows:
     EnqueueCount: 1
     DequeueCount: 0
     QueueSize: 1
* Start SunMQ
* Send a new message to the bridged queue.
** Messages are not delivered to the SunMQ broker.

===Scenario #2===
ActiveMQ broker with a bridged SunMQ Broker.
* Start SunMQ
* Start ActiveMQ
* Send a message to a bridged queue.
** The message is bridged to SunMQ Broker queue. The jmx console shows:
    ConsumerCount: 1
     EnqueueCount: 1
     DequeueCount: 1
     QueueSize: 0
* Stop SunMQ
* Send a new message to the bridged queue.
** Message is not delivered to the SunMQ broker.
** The jmx console shows, for the queue:
    ConsumerCount: 1
    EnqueueCount: 2
    DequeueCount: 2
    QueueSize: 1
**The log shows:
[DEBUG][2006/08/30.12:40:57.849][ActiveMQ Transport Server: 
tcp://localhost:61635]Sending: WireFormatInfo { version=2, 
properties={TightEncodingEnabled=true, TcpNoDelayEnabled=true, 
SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:40:57.849][ActiveMQ Transport Server: 
tcp://localhost:61635]Sending: WireFormatInfo { version=2, 
properties={TightEncodingEnabled=true, TcpNoDelayEnabled=true, 
SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:40:57.887][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]Received WireFormat: WireFormatInfo { version=2, 
properties={StackTraceEnabled=true, TightEncodingEnabled=true, 
TcpNoDelayEnabled=true, SizePrefixDisabled=false, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:40:57.888][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]tcp:///127.0.0.1:47305 before negotiation: 
OpenWireFormat{version=1, cacheEnabled=false, stackTraceEnabled=false, 
tightEncodingEnabled=false, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:40:57.889][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]tcp:///127.0.0.1:47305 after negotiation: 
OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, 
tightEncodingEnabled=true, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:40:57.887][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]Received WireFormat: WireFormatInfo { version=2, 
properties={StackTraceEnabled=true, TightEncodingEnabled=true, 
TcpNoDelayEnabled=true, SizePrefixDisabled=false, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:40:57.888][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]tcp:///127.0.0.1:47305 before negotiation: 
OpenWireFormat{version=1, cacheEnabled=false, stackTraceEnabled=false, 
tightEncodingEnabled=false, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:40:57.889][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]tcp:///127.0.0.1:47305 after negotiation: 
OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, 
tightEncodingEnabled=true, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:40:58.479][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]Adding consumer: ID:trabucco-47304-1156934456973-1:0:-1:1
[DEBUG][2006/08/30.12:40:58.479][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]Adding consumer: ID:trabucco-47304-1156934456973-1:0:-1:1
[DEBUG][2006/08/30.12:40:58.976][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]Removing consumer: 
ID:trabucco-47304-1156934456973-1:0:-1:1
[ERROR][2006/08/30.12:40:59.266][ActiveMQ Session Task]failed to forward 
message on attempt: 1 reason: javax.jms.IllegalStateException: [C4064]: Cannot 
perform operation, producer is closed. message: ActiveMQBytesMessage {commandId 
= 5, responseRequired = true, messageId = 
ID:trabucco-47304-1156934456973-1:0:1:1:1, originalDestination = null, 
originalTransactionId = null, producerId = 
ID:trabucco-47304-1156934456973-1:0:1:1, destination = queue://SUNRECV, 
transactionId = null, expiration = 0, timestamp = 1156934458928, arrival = 0, 
correlationId = null, replyTo = null, persistent = true, type = null, priority 
= 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = 
false, userID = null, content = [EMAIL PROTECTED], marshalledProperties = null, 
dataStructure = null, redeliveryCounter = 0, size = 529, properties = null, 
readOnlyProperties = true, readOnlyBody = true} ActiveMQBytesMessage{ bytesOut 
= null, dataOut = null, dataIn = null }([C4064]: Cannot perform operation, 
producer is closed.)
[DEBUG][2006/08/30.12:40:58.976][ActiveMQ Transport: 
tcp:///127.0.0.1:47305]Removing consumer: 
ID:trabucco-47304-1156934456973-1:0:-1:1
[ERROR][2006/08/30.12:40:59.266][ActiveMQ Session Task]failed to forward 
message on attempt: 1 reason: javax.jms.IllegalStateException: [C4064]: Cannot 
perform operation, producer is closed. message: ActiveMQBytesMessage {commandId 
= 5, responseRequired = true, messageId = 
ID:trabucco-47304-1156934456973-1:0:1:1:1, originalDestination = null, 
originalTransactionId = null, producerId = 
ID:trabucco-47304-1156934456973-1:0:1:1, destination = queue://SUNRECV, 
transactionId = null, expiration = 0, timestamp = 1156934458928, arrival = 0, 
correlationId = null, replyTo = null, persistent = true, type = null, priority 
= 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = 
false, userID = null, content = [EMAIL PROTECTED], marshalledProperties = null, 
dataStructure = null, redeliveryCounter = 0, size = 529, properties = null, 
readOnlyProperties = true, readOnlyBody = true} ActiveMQBytesMessage{ bytesOut 
= null, dataOut = null, dataIn = null }([C4064]: Cannot perform operation, 
producer is closed.)
*Start SunMQ again
** Nothing happens in activemq (as expected)
*Send a new message to the bridged queue.
** Message is not delivered to the SunMQ Broker.
**The jmx console shows, for the queue:
   ConsumerCount: 1
   EnqueueCount: 3
   DequeueCount: 3
   QueueSize: 2
**The log shows this:
[DEBUG][2006/08/30.12:43:19.803][ActiveMQ Transport Server: 
tcp://localhost:61635]Sending: WireFormatInfo { version=2, 
properties={TightEncodingEnabled=true, TcpNoDelayEnabled=true, 
SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:43:19.805][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]Received WireFormat: WireFormatInfo { version=2, 
properties={StackTraceEnabled=true, TightEncodingEnabled=true, 
TcpNoDelayEnabled=true, SizePrefixDisabled=false, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:43:19.806][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]tcp:///127.0.0.1:47315 before negotiation: 
OpenWireFormat{version=1, cacheEnabled=false, stackTraceEnabled=false, 
tightEncodingEnabled=false, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:43:19.807][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]tcp:///127.0.0.1:47315 after negotiation: 
OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, 
tightEncodingEnabled=true, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:43:19.803][ActiveMQ Transport Server: 
tcp://localhost:61635]Sending: WireFormatInfo { version=2, 
properties={TightEncodingEnabled=true, TcpNoDelayEnabled=true, 
SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:43:19.805][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]Received WireFormat: WireFormatInfo { version=2, 
properties={StackTraceEnabled=true, TightEncodingEnabled=true, 
TcpNoDelayEnabled=true, SizePrefixDisabled=false, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
[DEBUG][2006/08/30.12:43:19.806][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]tcp:///127.0.0.1:47315 before negotiation: 
OpenWireFormat{version=1, cacheEnabled=false, stackTraceEnabled=false, 
tightEncodingEnabled=false, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:43:19.807][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]tcp:///127.0.0.1:47315 after negotiation: 
OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, 
tightEncodingEnabled=true, sizePrefixDisabled=false}
[DEBUG][2006/08/30.12:43:20.433][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]Adding consumer: ID:trabucco-47314-1156934598004-1:0:-1:1
[DEBUG][2006/08/30.12:43:20.433][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]Adding consumer: ID:trabucco-47314-1156934598004-1:0:-1:1
[ERROR][2006/08/30.12:43:20.921][ActiveMQ Session Task]failed to forward 
message on attempt: 1 reason: javax.jms.IllegalStateException: [C4064]: Cannot 
perform operation, producer is closed. message: ActiveMQBytesMessage {commandId 
= 5, responseRequired = true, messageId = 
ID:trabucco-47314-1156934598004-1:0:1:1:1, originalDestination = null, 
originalTransactionId = null, producerId = 
ID:trabucco-47314-1156934598004-1:0:1:1, destination = queue://SUNRECV, 
transactionId = null, expiration = 0, timestamp = 1156934600848, arrival = 0, 
correlationId = null, replyTo = null, persistent = true, type = null, priority 
= 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = 
false, userID = null, content = [EMAIL PROTECTED], marshalledProperties = null, 
dataStructure = null, redeliveryCounter = 0, size = 529, properties = null, 
readOnlyProperties = true, readOnlyBody = true} ActiveMQBytesMessage{ bytesOut 
= null, dataOut = null, dataIn = null }([C4064]: Cannot perform operation, 
producer is closed.)
[DEBUG][2006/08/30.12:43:20.933][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]Removing consumer: 
ID:trabucco-47314-1156934598004-1:0:-1:1
[ERROR][2006/08/30.12:43:20.921][ActiveMQ Session Task]failed to forward 
message on attempt: 1 reason: javax.jms.IllegalStateException: [C4064]: Cannot 
perform operation, producer is closed. message: ActiveMQBytesMessage {commandId 
= 5, responseRequired = true, messageId = 
ID:trabucco-47314-1156934598004-1:0:1:1:1, originalDestination = null, 
originalTransactionId = null, producerId = 
ID:trabucco-47314-1156934598004-1:0:1:1, destination = queue://SUNRECV, 
transactionId = null, expiration = 0, timestamp = 1156934600848, arrival = 0, 
correlationId = null, replyTo = null, persistent = true, type = null, priority 
= 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = 
false, userID = null, content = [EMAIL PROTECTED], marshalledProperties = null, 
dataStructure = null, redeliveryCounter = 0, size = 529, properties = null, 
readOnlyProperties = true, readOnlyBody = true} ActiveMQBytesMessage{ bytesOut 
= null, dataOut = null, dataIn = null }([C4064]: Cannot perform operation, 
producer is closed.)
[DEBUG][2006/08/30.12:43:20.933][ActiveMQ Transport: 
tcp:///127.0.0.1:47315]Removing consumer: 
ID:trabucco-47314-1156934598004-1:0:-1:1

Furthermore, after restarting the activeMQ broker with non delivered messages 
in the bridged queue, can lead to lose those messages.

Regards

> JMS to JMS Bridge never reconnects under remote broker restarts.
> ----------------------------------------------------------------
>
>                 Key: AMQ-895
>                 URL: https://issues.apache.org/activemq/browse/AMQ-895
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.0 RC2, 4.0.1
>            Reporter: Manuel Teira
>
> I'm using ActiveMQ (4.0.1) JMS to JMS Bridge functionality to connect to a  
> SunMQ JMS Broker (3.6 SP3  (Build 02-A)). I'm using two queues, an input and 
> an output one, with the following configuration:
>     <jmsBridgeConnectors>
>       <jmsQueueConnector outboundQueueConnectionFactory="#REMOTE">
>       <outboundQueueBridges>
>         <outboundQueueBridge outboundQueueName="SUNRECV"/>
>       </outboundQueueBridges>
>       <inboundQueueBridges>
>         <inboundQueueBridge inboundQueueName="SUNSEND"/>
>       </inboundQueueBridges>
>       </jmsQueueConnector>
>     </jmsBridgeConnectors>
> The system works really well until the SunMQ broker needed to be restarted. 
> This is what I found:
> 1.-ActiveMQ is not aware of the remote broker shutdown. I waited for a while, 
> but no log on ActiveMQ indicates knowledge about the new situation.
> 2.-When I send a message to the output queue SUNRECV, ActiveMQ complains that 
> the producer is closed:
> [ERROR][2006/08/25.09:47:12.039][ActiveMQ Session Task]failed to forward 
> message: ActiveMQTextMessage {commandId = 5, responseRequired = false, 
> messageId = ID:trabucco-43457-1156491843149-3:4:1:1:1, originalDestination = 
> null, originalTransactionId = null, producerId = 
> ID:trabucco-43457-1156491843149-3:4:1:1, destination = queue://SUNRECV, 
> transactionId = null, expiration = 0, timestamp = 1156492032027, arrival = 0, 
> correlationId = null, replyTo = null, persistent = false, type = null, 
> priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, 
> compressed = false, userID = null, content = null, marshalledProperties = 
> null, dataStructure = null, redeliveryCounter = 0, size = 2, properties = 
> null, readOnlyProperties = true, readOnlyBody = true, text = 1}([C4064]: 
> Cannot perform operation, producer is closed.)
>  After this, it is automatically queueing messages without sending them, 
> showing the log:
> [DEBUG][2006/08/25.09:47:42.721][RMI TCP Connection(4)-10.95.89.20]No 
> subscriptions registered, will not dispatch message at this time.
>  Even if SunMQ is started again, ActiveMQ is not detecting the new situation, 
> and continues queueing messages sent to SUNRECV.
> Please, make me know if more information is needed to understand the 
> situation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to