내 Apache-camel 기반 앱이 IBM 대기열에서 메시지를 소비합니다. 아래 연결 팩토리에 대한 세부 사항을 소비하고 프로세스 및 메시지 헤더에서 오는 ReplyQueue에 대한 응답을 보낼 수다른 대기열에 메시지를 보내는 방법 IBM MQ 클러스터의 다른 대기열 관리자 및 호스트 이름에 호스트 됨
hostname=host1000
QManager=QM1000
Port="some port"
Channel="common channel"
낙타 흐름이다.
from(wmq:queue:<INPUT_QUEUE>)
.bean("processBean")
.bean("beanToSendMsgToReplyQueue")
낙타 헤더에서 JMSReplyQueue 아래에 있습니다. 다른 큐 관리자이고이 큐 관리자는 다른 호스트이지만 클러스터 환경에 있음을 알 수 있습니다.
JMSReplyTo = queue://QM1012/TEST.REPLY?targetClient=1
또한 큐 관리자가 들어오고 있습니다. like
queue://<queue-manager>//<queue-name>?<other parameters>
아래는 예외적으로 메시지를 보내는 중입니다.
ERROR o.apache.camel.processor.DefaultErrorHandler:215 - Failed delivery for (MessageId: ID-xxxxxxxxx-0-4 on ExchangeId: ID-xxxxxx-42443-1492594420697-0-1). Exhausted after delivery attempt: 1 caught: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: wmq://queue://QM1012/TEST.REPLY?targetClient=1 due to: Failed to resolve endpoint: wmq://queue://TAP2001R5/TEST?targetClient=1 due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{targetClient=1}]. Processed by failure processor: FatalFallbackErrorHandler[Pipeline[[Channel[sendTo(Endpoint[wmq://queue:BACKOUT_Q])], Channel[DelegateSync[[email protected]]], Channel[Stop]]]]
누구든지 다른 호스트에있는 다른 큐 관리자 큐에 메시지를 보내는데 도움이 될 수 있지만 모두 동일한 클러스터에 있습니다. 또한 큐 관리자 이름이 문자열의 중간에 오므로이를 해결하는 방법도 있습니다. 자세한 내용이 필요하면 알려주십시오.
업데이트 -1 : 는
org.springframework.jms.InvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'QM1000/QUEUE_V1'.; nested exception is com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'QM1000/QUEUE_V1'. JMS attempted to perform an MQOPEN, but WebSphere MQ reported an error. Use the linked exception to determine the cause of this error. Check that the specified queue and queue manager are defined correctly.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2189' ('MQRC_CLUSTER_RESOLUTION_ERROR').
업데이트-2
내가 수 있어요 내가
을 얻고 동일한 큐 관리자로 및 매개 변수 예외 아래JMSReplyTo = queue://QM1000/QUEUE_V1
없이 시도 일반 javax.jms. * 및 com.ibm.mq.jms. * api를 사용하여 JMSReplyTo에 메시지를 보내십시오. pache 낙타. Camel 사용자/개발자 그룹의 누구라도 낙타 구성 요소를 사용하여 동일한 프로세스를 처리 할 수 있습니까?
@Override
public void process(Exchange exchange)
throws Exception {
QueueConnection m_connection = this.connectionFactory.createQueueConnection();
//m_connection.start();
boolean transacted = false;
QueueSession session = m_connection.createQueueSession(transacted, QueueSession.AUTO_ACKNOWLEDGE);
TextMessage outMessage = session.createTextMessage();
outMessage.setText(exchange.getIn().getBody());
MQQueue mq = new MQQueue(
"queue://QM1012/TEST.REPLY");
QueueSender queueSender = session.createSender((MQQueue) mq);
queueSender.send(outMessage);
/* producerTemplate.send("wmq:" + "queue://QM1012/TEST.REPLY", exchange); */
}
targetClient = 1 JMS는에 RFH2 헤더라고도 JMS 헤더에 대한 IBM MQ 클래스를 추가 할 것을 나타낸다 즉, 원격 응용 프로그램은 JMS 응용 프로그램이 아닐 수 있습니다. Camel 흐름에서 다른 방식으로 지정해야 할 수도 있습니까? – JoshMc
예, targetClient = 1을 다른 방법으로 지정하고 해결할 수 있습니다. 우선 첫번째 문제는 IBM MQ 클러스터의 다른 큐 관리자와 호스트 이름에서 호스팅되는 다른 큐로 메시지를 해석하거나 보내는 방법입니다. – srakshit
wmq : //을 뺀 URI는 특정 큐 관리자에서 JMS의 IBM MQ 클래스에 대한 큐를 지정하는 방법입니다. 나는 너에게 더 많은 것을 돕기 위해 낙타에 익숙하지 않다. MQ 7.1 또는 이전 버전이 지원되지 않거나 MQ 7.1 이상에서 특정 원격 대기열 관리자의 rqmname에 대한 권한을 제공 할 수있는 경우 SCTQ에 대한 권한이 필요합니다. – JoshMc