I am running a broker and a message sender on the same machine, and no
matter what I do, I cannot see any messages enqueued on the broker
when I view it with JConsole.  On the sender side, the trace debug
looks like what's show below.  Clearly the sender is talking to
SOMETHING at localhost:61616 and it claims to be sending a text
message to that something, so why on earth won't the messages show up
in the broker?  I have spent hours trying to get this to work and I am
at my wits' end.  What could I be missing?  This is the sender code:

final QueueConnection connection = mqConnectionFactory.createQueueConnection();
final QueueSession session = connection.createQueueSession(true, 
Session.AUTO_ACKNOWLEDGE);
final Queue destination = session.createQueue("Command");
final QueueSender sender = session.createSender(destination);
sender.send(session.createTextMessage("Hello, 
world!"),DeliveryMode.PERSISTENT,Message.DEFAULT_PRIORITY,(long)180000);
connection.start();

DEBUG: [2006-09-27 08:47:26,751] 
org.apache.activemq.transport.WireFormatNegotiator( ) - Sending: WireFormatInfo 
{ version=1, properties={TightEncodingEnabled=true, TcpNoDelayEnabled=true, 
SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG: [2006-09-27 08:47:26,751] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: WireFormatInfo { 
version=1, properties={TightEncodingEnabled=true, TcpNoDelayEnabled=true, 
SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, 
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG: [2006-09-27 08:47:26,767] 
org.apache.activemq.transport.tcp.TcpTransport( ) - TCP consumer thread starting
DEBUG: [2006-09-27 08:47:26,782] 
org.apache.activemq.transport.TransportLogger:1( ) - RECEIVED: from: null : 
WireFormatInfo { version=1, properties={StackTraceEnabled=true, 
TightEncodingEnabled=true, TcpNoDelayEnabled=true, SizePrefixDisabled=false, 
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG: [2006-09-27 08:47:26,798] 
org.apache.activemq.transport.WireFormatNegotiator( ) - Received WireFormat: 
WireFormatInfo { version=1, properties={StackTraceEnabled=true, 
TightEncodingEnabled=true, TcpNoDelayEnabled=true, SizePrefixDisabled=false, 
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG: [2006-09-27 08:47:26,798] 
org.apache.activemq.transport.WireFormatNegotiator( ) - 
tcp://localhost/127.0.0.1:61616 before negotiation: OpenWireFormat{version=1, 
cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, 
sizePrefixDisabled=false}
DEBUG: [2006-09-27 08:47:26,798] 
org.apache.activemq.transport.WireFormatNegotiator( ) - 
tcp://localhost/127.0.0.1:61616 after negotiation: OpenWireFormat{version=1, 
cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, 
sizePrefixDisabled=false}
DEBUG: [2006-09-27 08:47:26,798] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: ConnectionInfo 
{commandId = 1, responseRequired = true, connectionId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0, clientId = 
ID:TBS-675CFA3526E-1871-1159361246454-2:0, userName = null, password = null, 
brokerPath = null, brokerMasterConnector = false, manageable = true}
DEBUG: [2006-09-27 08:47:26,798] 
org.apache.activemq.transport.TransportLogger:1( ) - RECEIVED: from: null : 
BrokerInfo {commandId = 1, responseRequired = false, brokerId = 
ID:TBS-675CFA3526E-1863-1159361202673-1:0, brokerURL = 
tcp://TBS-675CFA3526E:61616, slaveBroker = false, masterBroker = false, 
faultTolerantConfiguration = false, peerBrokerInfos = [], brokerName = 
localhost}
DEBUG: [2006-09-27 08:47:26,798] 
org.apache.activemq.transport.TransportLogger:1( ) - RECEIVED: from: null : 
Response {commandId = 2, responseRequired = false, correlationId = 1}
DEBUG: [2006-09-27 08:47:26,814] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: ConsumerInfo 
{commandId = 2, responseRequired = true, consumerId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0:-1:1, destination = 
topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic, 
prefetchSize = 1000, maximumPendingMessageLimit = 0, browser = false, 
dispatchAsync = false, selector = null, subcriptionName = null, noLocal = true, 
exclusive = false, retroactive = false, priority = 0, brokerPath = null, 
optimizedAcknowledge = false, noRangeAcks = false, additionalPredicate = null}
DEBUG: [2006-09-27 08:47:26,814] 
org.apache.activemq.transport.TransportLogger:1( ) - RECEIVED: from: null : 
Response {commandId = 3, responseRequired = false, correlationId = 2}
DEBUG: [2006-09-27 08:47:26,861] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: SessionInfo 
{commandId = 3, responseRequired = false, sessionId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0:1}
DEBUG: [2006-09-27 08:47:26,876] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: ProducerInfo 
{commandId = 4, responseRequired = false, producerId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0:1:1, destination = queue://Commands, 
brokerPath = null}
DEBUG: [2006-09-27 08:47:26,907] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: TransactionInfo 
{commandId = 5, responseRequired = false, type = 0, connectionId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0, transactionId = 
TX:ID:TBS-675CFA3526E-1871-1159361246454-1:0:1}
DEBUG: [2006-09-27 08:47:26,907] org.apache.activemq.ActiveMQSession() - 
Sending message: ActiveMQTextMessage {commandId = 0, responseRequired = false, 
messageId = ID:TBS-675CFA3526E-1871-1159361246454-1:0:1:1:1, 
originalDestination = null, originalTransactionId = null, producerId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0:1:1, destination = queue://Commands, 
transactionId = TX:ID:TBS-675CFA3526E-1871-1159361246454-1:0:1, expiration = 
1159361426907, timestamp = 1159361246907, arrival = 0, correlationId = null, 
replyTo = null, persistent = true, type = null, priority = 4, groupID = null, 
groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, 
content = null, marshalledProperties = null, dataStructure = null, 
redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, 
readOnlyBody = true, text = Hello, world!}
DEBUG: [2006-09-27 08:47:26,907] 
org.apache.activemq.transport.TransportLogger:1( ) - SENDING: 
ActiveMQTextMessage {commandId = 6, responseRequired = false, messageId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0:1:1:1, originalDestination = null, 
originalTransactionId = null, producerId = 
ID:TBS-675CFA3526E-1871-1159361246454-1:0:1:1, destination = queue://Commands, 
transactionId = TX:ID:TBS-675CFA3526E-1871-1159361246454-1:0:1, expiration = 
1159361426907, timestamp = 1159361246907, arrival = 0, correlationId = null, 
replyTo = null, persistent = true, type = null, priority = 4, groupID = null, 
groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, 
content = null, marshalledProperties = null, dataStructure = null, 
redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, 
readOnlyBody = true, text = Hello, world!}

-- 
C. Benson Manica
ataru(at)sdf.lonestar.org

Reply via email to