2013-03-05 2 views
0

WSDD MB 3.2.1과 함께 RabbitMQ 2.8.7 DotNet 클라이언트를 사용하고 있습니다. 내 배포 환경은 Win7 R1 64 비트 또는 Win Server 08 R2 64 비트입니다. 여러 소비자에게 스트리밍되는 데이터가 간헐적으로 손실되어 Exchange에 대한 여러 연결 문제가 발생했습니다. 우리는 WSO2 MB를 3.2.3 &으로 업데이트하려고 시도해 왔습니다. 연결 손실을 해결하기 위해 팬 아웃 교환을 변경했지만 문제가 발생했습니다.AMQ/QPID & WSO2 메시지 브로커 팬 아웃 Exchange와 함께 RabbitMQ C# 사용

이 링크가 어느 정도 관련이 있음 "표시"것 :

http://wso2-oxygen-tank.10903.n7.nabble.com/Qpid-Authorization-handler-does-not-allow-to-subscribe-td2080.html

내가 처음이 올바른 접근 방식인지 확인하고 싶었다.

두 번째로 우리는 런타임에 팬 아웃을 사용하여 데이터에 액세스 할 수 없으므로 현재 수신하고있는 오류를 이해하고자했습니다. 다음은 수신 된 오류입니다. WSO2 MB 로그 출력은 생산자의 코드 스 니펫 &입니다.

자세한 정보가 필요한 경우 알려주십시오.

오류받은 ... 오류의

"Unhandled Exception: 
RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation 
was interrupted: AMQP close-reason, initiated by Peer, code=504, text="org.apache.qpid.AMQSecurityException: Permission denied: binding 
[error code 403: access refused]", classId=50, methodId=20, cause= 
    at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply() 
    at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body) 
    at RabbitMQ.Client.Framing.Impl.v0_9_1.Model._Private_QueueBind(String queue, 
String exchange, String routingKey, Boolean nowait, IDictionary arguments) 
    at RabbitMQ.Client.Impl.ModelBase.QueueBind(String queue, String exchange, String routingKey, IDictionary arguments) 
    at RabbitMQ.Client.Impl.ModelBase.QueueBind(String queue, String exchange, String routingKey) 
    at Send.Main() 

로그 @ 시간은 ...

INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,042] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 0, bodyFrame: [ConnectionStartOkBodyImpl: clientProperties={platform=[LONG_STRING: .NET], product=[LONG_STRING: RabbitMQ], capabilities=[FIELD_TABLE: {publisher_confirms=[BOOLEAN: true], exchange_exchange_bindings=[BOOLEAN: true], consumer_cancel_notify=[BOOLEAN: true], basic.nack=[BOOLEAN: true]}], copyright=[LONG_STRING: Copyright (C) 2007-2012 VMware, Inc.], information=[LONG_STRING: Licensed under the MPL. See http://www.rabbitmq.com/], (http://www.rabbitmq.com/%5D,) version=[LONG_STRING: 0.0.0.0]}, mechanism=PLAIN, response=[0, 115, 118, 99, 46, 114, 105, 46, 97, 116, 99, 0, 112, 97, 115, 115, 119, 111, 114, 100], locale=en_US] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,042] INFO {org.apache.qpid.server.handler.ConnectionStartOkMethodHandler} - SASL Mechanism selected: PLAIN 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,042] INFO {org.apache.qpid.server.handler.ConnectionStartOkMethodHandler} - Locale selected: en_US 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,681] INFO {org.apache.qpid.server.handler.ConnectionStartOkMethodHandler} - Connected as: svc.abc.def 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,681] INFO {org.apache.qpid.server.handler.ConnectionStartOkMethodHandler} - Framesize set to 65535 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,681] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 0, bodyFrame: [ConnectionTuneOkBodyImpl: channelMax=256, frameMax=65535, heartbeat=0] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,681] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 0, bodyFrame: [ConnectionOpenBodyImpl: virtualHost=carbon, capabilities=null, insist=false] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,697] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 1, bodyFrame: [ChannelOpenBodyImpl: outOfBand=null] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,697] INFO {org.apache.qpid.server.handler.ChannelOpenHandler} - Connecting to: carbon 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,697] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 1, bodyFrame: [QueueDeclareBodyImpl: ticket=0, queue=fanout, passive=false, durable=false, exclusive=false, autoDelete=false, nowait=false, arguments=null] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,759] INFO {org.apache.qpid.server.handler.QueueDeclareHandler} - Queue fanout bound to default exchange(<<default>>) 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,759] INFO {org.apache.qpid.server.handler.QueueDeclareHandler} - Queue fanout declared successfully 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,759] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 1, bodyFrame: [QueueBindBodyImpl: ticket=0, queue=fanout, exchange=fanout, routingKey=null, nowait=false, arguments=null] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,759] INFO {org.apache.qpid.server.protocol.AMQProtocolEngine} - Closing channel due to: org.apache.qpid.AMQSecurityException: Permission denied: binding [error code 403: access refused] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,759] INFO {org.apache.qpid.server.AMQChannel} - No consumers to unsubscribe on channel [/192.168.1.14:56087(svc.abc.def):1] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,775] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 1, bodyFrame: [ChannelCloseOkBodyImpl: ] 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,775] INFO {org.apache.qpid.server.protocol.AMQProtocolEngine} - Channel[1] awaiting closure - processing close-ok 
INFO | jvm 1 | 2013/03/01 11:29:27 | [2013-03-01 11:29:27,775] INFO {org.apache.qpid.server.handler.ChannelCloseOkHandler} - Received channel-close-ok for channel-id 1 
INFO | jvm 1 | 2013/03/01 11:29:29 | [2013-03-01 11:29:29,070] DEBUG {org.apache.qpid.server.protocol.AMQProtocolEngine} - Frame Received: Frame channelId: 0, bodyFrame: [ConnectionCloseBodyImpl: replyCode=200, replyText=Connection close forced, classId=0, methodId=0] 
INFO | jvm 1 | 2013/03/01 11:29:29 | [2013-03-01 11:29:29,070] INFO {org.apache.qpid.server.handler.ConnectionCloseMethodHandler} - ConnectionClose received with reply code/reply text 200/Connection close forced for /192.168.1.14:56087(svc.abc.def) 

나뿐만 아니라 자바와 연결을 시도 할 때이 문제가 발생할 것을 발견했다. 생산자에 대한 C# 코드의 간단한 예는 다음과 같습니다 : 교류 '가 팬 아웃'교환이 작품을 얻을 수있는 이름 given.Therefore 동적으로 생성되지 않습니다 WSO2 MB에서

class Send { 

    public static void Main() { 

     string serverAddress = "amqp://" + "192.168.1.12" + ":5672/carbon"; 

      ConnectionFactory factory = new ConnectionFactory(); 

      factory.Uri = serverAddress; 

      using (IConnection connection = factory.CreateConnection()) 

      using (IModel channel = connection.CreateModel()) { 

      channel.QueueDeclare("fanout", false, false, false, null); 

      channel.QueueBind("fanout", "fanout", ""); 

      string message = "Hello World!"; 

      byte[] body = System.Text.Encoding.UTF8.GetBytes(message); 

      channel.BasicPublish("", "hello", null, body); 
      Console.WriteLine(" [x] Sent {0}", message); 
     } 
    } 
} 

답변

1

, 그것은 필요 qpid-virtualhosts.xml 파일에 미리 선언해야합니다. 그렇지 않으면 WSO2 MB의 기본 교환을 사용하십시오.

대기열을 바인딩해야하는 교환기 이름을 올바르게 선언하지 않은 것으로 보입니다.

이 주제 인 경우
ch.ExchangeDeclare("amq.direct", "direct"); 

,`

ch.ExchangeDeclare("amq.topic", "topic"); 

샘플 닷넷/C#을 소비자를 사용하기위한 this 블로그 게시물을 참조하시기 바랍니다, 같은 큐에 대한 그것은 기본적 교환 이름 선언이 될 경우/WSO2 Message Broker를 사용하는 게시자 클라이언트 '

관련 문제