骡子和兔子AMQP - 试图发送到交换

时间:2013-07-05 09:06:45

标签: rabbitmq mule amqp

在我的mule应用程序中,我正在尝试向Rabbit MQ交换发送消息(xml)。 在我的应用程序中,我定义了:

<scripting:component doc:name="CreateXML">
<scripting:script engine="Groovy"><![
def xml = "" //previously created xml
return xml]]></scripting:script>
</scripting:component>
<amqp:outbound-endpoint
          exchangeName="test-exchange.srv"
          routingKey="auc.guest1.test"
          connector-ref="AMQPRabbitConnector" />

我与Rabbit MQ的连接器看起来像:

<amqp:connector
          name="AMQPRabbitConnector"
          virtualHost="dev"
          username="guest"
          password="guest"
          activeDeclarationsOnly="false"/>

当我运行我的应用程序时,在发送消息一段时间后,我变得异常:

ERROR 2013-07-05 10:53:34,020 [[fis-bps-pgm-mule].AMQPRabbitConnector.dispatcher.01] org.mule.exception.DefaultMessagingExceptionStrategy: 
********************************************************************************
Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=amqp://test-exchange.srv, connector=AmqpConnector
{
  name=AMQPRabbitConnector
  lifecycle=start
  this=2bfec68b
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[amqp]
  serviceOverrides=<none>
}
}
,  name='endpoint.amqp.test-exchange.srv', mep=ONE_WAY, properties={routingKey=auc.guest1.test}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: AmqpMessage
Type                  : org.mule.api.transport.DispatchException
Code                  : MULE_ERROR--2
Payload               : org.mule.transport.amqp.AmqpMessage@68e64543[consumerTag=<null>,envelope=com.rabbitmq.client.Envelope@7b2fc059,body={60,63,120,109,108,32,118,101,114,115,105,111,110,61,39,49,46,48,39,63,62,10,60,99,114,101,9

1 个答案:

答案 0 :(得分:0)

我解决问题。 在流的前一个元素中,我正在设置出站属性,而没有连接器工作正常。