Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement exchangeBind(String destination, String source, String routingKey) #31

Closed
gvolpe opened this issue Jun 24, 2017 · 4 comments
Closed
Labels

Comments

@gvolpe
Copy link
Member

gvolpe commented Jun 24, 2017

Bare in mind that fs2-rabbit is just a wrapper for the AMQP Java client. So, whenever adding a new method that is supported by the native client, the procedure will be more or less the same:

  1. Check the signatures in the java doc of the official java client:
    https://www.rabbitmq.com/releases/rabbitmq-java-client/current-javadoc/com/rabbitmq/client/Channel.html
  2. For this case, the return type is AMQP.Exchange.BindOk so in fs2-rabbit it will be Stream[F, Exchange.BindOk]
  3. Add the new method at the end of the Fs2Rabbit file.
  4. Add scala doc comments to the new method. Take a look at the existent methods but in general it could be more or less similar to the Java client docs. This is the one for this method: "Bind an exchange to an exchange, with no extra arguments."
  5. Add a unit test in the file Fs2RabbitSpec: I can help you out with this part since it's not as trivial as adding the new method and sometimes it might be okay to just invoke the method on an existent test instead of creating a new one.

HINT: Look at the existent method bindQueue, this one will be very similar ;)

Thanks for contributing!

@gvolpe gvolpe added the spree label Jun 24, 2017
@szymonm
Copy link
Contributor

szymonm commented Jul 7, 2017

Let me work on it.

@gvolpe
Copy link
Member Author

gvolpe commented Jul 7, 2017

Great @szymonm !

@szymonm
Copy link
Contributor

szymonm commented Jul 7, 2017

For now qpid can't test bindExchange. I get following error

13:02:48.729 [IO-/0:0:0:0:0:0:0:1:49279] ERROR o.a.q.s.p.v.AMQPConnection_0_8Impl - Unexpected exception
org.apache.qpid.framing.AMQFrameDecodingException: Method 30 unknown in AMQP version 0-91 (while trying to decode class 40 method 30.
	at org.apache.qpid.codec.AMQDecoder.newUnknownMethodException(AMQDecoder.java:221) ~[qpid-common-6.1.2.jar:6.1.2]
	at org.apache.qpid.codec.ServerDecoder.processMethod(ServerDecoder.java:240) ~[qpid-common-6.1.2.jar:6.1.2]
	at org.apache.qpid.codec.AMQDecoder.processFrame(AMQDecoder.java:196) ~[qpid-common-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:143) ~[qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:67) ~[qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.codec.AMQDecoder.processInput(AMQDecoder.java:178) ~[qpid-common-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.access$000(BrokerDecoder.java:36) ~[qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:106) ~[qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:99) ~[qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_131]
	at org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processAMQPFrames(BrokerDecoder.java:98) ~[qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.codec.AMQDecoder.decode(AMQDecoder.java:111) ~[qpid-common-6.1.2.jar:6.1.2]
	at org.apache.qpid.codec.ServerDecoder.decodeBuffer(ServerDecoder.java:43) ~[qpid-common-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:253) [qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:245) [qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_131]
	at org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl.received(AMQPConnection_0_8Impl.java:244) [qpid-broker-plugins-amqp-0-8-protocol-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:142) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:624) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:512) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:285) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:126) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97) [qpid-broker-core-6.1.2.jar:6.1.2]
	at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521) [qpid-broker-core-6.1.2.jar:6.1.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
13:02:48.732 [IO-/0:0:0:0:0:0:0:1:49279] INFO  o.a.q.s.t.NonBlockingConnection - Exception performing I/O for connection '/0:0:0:0:0:0:0:1:49279' : org.apache.qpid.framing.AMQFrameDecodingException: Method 30 unknown in AMQP version 0-91 (while trying to decode class 40 method 30. [error code 503: command invalid]
13:02:48.762 [IO-/0:0:0:0:0:0:0:1:49279] INFO  qpid.message.channe

@szymonm szymonm mentioned this issue Jul 7, 2017
@gvolpe
Copy link
Member Author

gvolpe commented Jul 7, 2017

Thanks for reporting that qpid error, I need to look into that.

@gvolpe gvolpe closed this as completed in #35 Jul 7, 2017
gvolpe pushed a commit that referenced this issue Jul 7, 2017
bindExchange(String destination, String source, String routingKey) implementation #31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants