0

在我的骡子应用程序中,我试图将消息(xml)发送到 Rabbit MQ 交换。在我的应用程序中,我定义了:

<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
4

1 回答 1

0

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

于 2013-07-09T08:53:41.343 回答