Hi,

FYI- 
The following change helped-
Disabled Activemq TCP connector with multicast discovery to avoid
intermittent broker session issues.
Modified transport connectors config in activemq.xml 
From
<transportConnector uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
To 
<transportConnectors>
            <transportConnector name="openwire"
uri="tcp://localhost:16161"/>





Jean-Baptiste Onofré wrote:
> 
>  Hi,
> 
>  It seems that the bottleneck in on ActiveMQ.
> 
>  Have you tried to increase the SMX queueSize ? By default, it's set
> to 256.
>  You can edit the conf/servicemix.properties file to increase to 512
> and try again.
> 
>  Regards
>  JB
>  -- 
>  Jean-Baptiste Onofré 
>  [EMAIL PROTECTED] 
>  BuildProcess/AutoDeploy Project Leader 
>  http://buildprocess.sourceforge.net
> 
>  On Wed 03/12/08 10:26, "Richa Khurana" [EMAIL PROTECTED]
> wrote:
>  Hi, 
> 
>  I have a simple application to send mails asynchronously. This is
> what I 
>  do- 
> 
>  1. I have a simple JMS client which sends email as an XML Payload 
>  to SMX JMS. I am direcly accessing it with tcp protocol. 
>  2. The messages are received by JMS server on SMX side. 
>  3. These messages are routed to my XBean, which in turn uses camel 
>  mail component to send the mails. 
> 
>  Although email functionality works fine, very often I get this error
> 
>  message on SMX console and all the components stop working. On
> restart 
>  of SMX, everything starts working again. 
> 
>  Here is the exception- 
> 
>  javax.jms.JMSException: Wire format negociation timeout: peer did
> not 
>  send his wire format. 
>  at 
> 
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.
> 
>  java:58) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection
> 
>  .java:1185) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQ
> 
>  Connection.java:1263) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.
> 
>  java:276) 
>  at 
> 
> org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.ja
> 
>  va:200) 
>  at 
> 
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:419)
> 
>  at 
> 
> org.springframework.jms.core.JmsTemplate.receiveSelected(JmsTemplate.jav
> 
>  a:658) 
>  at 
> 
> com.thirdpillar.scoring.ScoringAggregator.listenForMessage(ScoringAggreg
> 
>  ator.java:102) 
>  at 
> 
> com.thirdpillar.scoring.ScoringAggregator.run(ScoringAggregator.java:63)
> 
>  at 
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
> 
>  r.java:650) 
>  at 
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> 
>  va:675) 
>  at java.lang.Thread.run(Thread.java:595) 
>  Caused by: java.io.IOException: Wire format negociation timeout:
> peer 
>  did not send his wire format. 
>  at 
> 
> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNego
> 
>  tiator.java:88) 
>  at 
> 
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:
> 
>  47) 
>  00:27:19,676 |INFO - 2008-12-03T00_24_58,379 - Time to Hit 
>  Merlin service :- 0.219 seconds 
>  00:27:19,676 |INFO - 2008-12-03T00_24_58,379 - -----------Merlin 
>  service call completed----------- 
>  at 
> 
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCo
> 
>  rrelator.java:69) 
>  at 
> 
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrela
> 
>  tor.java:74) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection
> 
>  .java:1175) 
>  ... 10 more 
>  javax.jms.IllegalStateException: The Session is closed 
>  at 
> 
> org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:581
> 
>  ) 
>  at 
> 
> org.apache.activemq.ActiveMQSession.getTransacted(ActiveMQSession.java:4
> 
>  26) 
>  at 
> 
> org.springframework.jms.core.JmsTemplate.doReceive(JmsTemplate.java:697)
> 
>  at 
> 
> org.springframework.jms.core.JmsTemplate.doReceive(JmsTemplate.java:676)
> 
>  at 
> 
> org.springframework.jms.core.JmsTemplate$11.doInJms(JmsTemplate.java:661
> 
>  ) 
>  at 
> 
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:428)
> 
>  at 
> 
> org.springframework.jms.core.JmsTemplate.receiveSelected(JmsTemplate.jav
> 
>  a:658) 
>  at 
> 
> com.thirdpillar.scoring.ScoringAggregator.listenForMessage(ScoringAggreg
> 
>  ator.java:102) 
>  at 
> 
> com.thirdpillar.scoring.ScoringAggregator.run(ScoringAggregator.java:63)
> 
>  at 
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
> 
>  r.java:650) 
>  at 
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> 
>  va:675) 
>  at java.lang.Thread.run(Thread.java:595) 
>  javax.jms.JMSException: Wire format negociation timeout: peer did
> not 
>  send his wire format. 
>  at 
> 
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.
> 
>  java:58) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection
> 
>  .java:1185) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQ
> 
>  Connection.java:1263) 
>  at 
> 
> org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.
> 
>  java:276) 
> 
>  My JMSClient is- 
> 
>  public static void sendJMSMessageAsynchronously(String message) 
> 
>  throws JMSException { 
> 
>  logger.debug("In sendJMSMessageAsynchronously of 
>  JMSClientUtil"); 
> 
>  try { 
> 
>  connectionFactory = new 
>  ActiveMQConnectionFactory(QUEUE_CONFAC); 
> 
>  queueConnection = 
>  connectionFactory.createQueueConnection(); 
> 
>  queueSession = 
>  queueConnection.createQueueSession(false, 
> 
>  javax.jms.Session.AUTO_ACKNOWLEDGE); 
> 
>  requestQueue = queueSession.createQueue(QUEUE_NAME); 
> 
>  queueSender = queueSession.createSender(requestQueue); 
> 
>  queueConnection.start(); 
> 
>  logger.debug("Queue Connection started with queue: " + 
>  QUEUE_CONFAC 
> 
>  + " name " + QUEUE_NAME); 
> 
>  TextMessage jmsMessage = 
>  queueSession.createTextMessage(); 
> 
>  jmsMessage.setText(message); 
> 
>  queueSender.send(jmsMessage); 
> 
>  } catch (JMSException ex) { 
> 
>  logger.error("Error occured in JMS connection" + ex); 
> 
>  throw ex; 
> 
>  }finally{ 
> 
>  if (queueSender!=null) queueSender.close(); 
> 
>  if (queueSession!=null) queueSession.close(); 
> 
>  if (queueConnection!=null) queueConnection.close(); 
> 
>  } 
> 
>  } 
> 
>  MY XBean has the below code- 
> 
>  MailComponent component = (MailComponent) camel 
> 
>  .getComponent("mail"); 
> 
>  endpoint = component.createEndpoint(strEndPoint); 
> 
>  normalizedMessage = reverseExchange.getMessage("in"); 
> 
>  stringSource = (StringSource) 
>  normalizedMessage.getContent(); 
> 
>  Exchange exchange = endpoint.createExchange(); 
> 
>  Message in = exchange.getIn(); 
> 
>  in.setBody(bodyContent); 
> 
>  Producer producer = endpoint.createProducer(); 
> 
>  // start the producer 
> 
>  producer.start(); 
> 
>  LOG.debug("onMessageExchange(): Producer started 
>  successfully"); 
> 
>  // Processes the exchange by sending the email 
> 
>  producer.process(exchange); 
> 
>  producer.stop(); 
> 
>  Richa Khurana| Associate Consultant - Engineering| GlobalLogic Inc. 
>  USA | INDIA | UKRAINE | CHINA 
>  Office: +91.120.406.2681 
> 
>  www.globallogic.com <http://www.globallogic.com/> [1]; 
>  InfoWorld Award Winner for Agile Innovation 
>  <http://www.globallogic.com/Media/pressReleaseDetail.asp?press/65>
> [2]; 
> 
>  Disclaimer: http://www.globallogic.com/email_disclaimer.txt [3] 
>  <http://www.globallogic.com/email_disclaimer.txt> [4]; 
> 
> 
> 
> Links:
> ------
> [1] http://www.globallogic.com/&gt
> [2]
> http://www.globallogic.com/Media/pressReleaseDetail.asp?press/65&gt
> [3] http://www.globallogic.com/email_disclaimer.txt
> [4] http://www.globallogic.com/email_disclaimer.txt&gt
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-javax.jms.JMSException%3A-Wire-format-negociation-timeout%3A-peer-did-not-send-his-wire-format-on-SMX-console-tp20809709p20850711.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to