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

AMQP Spec Heartbeat differs from RabbitMQ Heartbeat #88

Closed
reardonj opened this issue Feb 20, 2023 · 3 comments
Closed

AMQP Spec Heartbeat differs from RabbitMQ Heartbeat #88

reardonj opened this issue Feb 20, 2023 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@reardonj
Copy link

Hi, I'm trying out your library, but when I run a consumer, I eventually get this decoding error:

root failed to decode BitVector(64 bits, 0x08000000000000ce): expected constant BitVector(8 bits, 0xce) but got BitVector(8 bits, 0x00)

This is a heartbeat message, but as provided by the server I'm using, has a full AMQP frame, instead of the short heartbeat frame in the spec. This appears to be a common spec deviation mentioned in the RabbitMQ documentation. Is it possible to support this version of the heartbeat as well?


Full error and stack trace for reference:

root failed to decode BitVector(64 bits, 0x08000000000000ce): expected constant BitVector(8 bits, 0xce) but got BitVector(8 bits, 0x00)
root[ERROR] fs2.CompositeFailure: Multiple exceptions were thrown (2), first fs2.interop.scodec.CodecError: expected constant BitVector(8 bits, 0xce) but got BitVector(8 bits, 0x00)
root[ERROR]     at fs2.CompositeFailure$.apply(CompositeFailure.scala:58)
root[ERROR]     at fs2.CompositeFailure$.apply(CompositeFailure.scala:45)
root[ERROR]     at fs2.CompositeFailure$.fromResults$$anonfun$1(CompositeFailure.scala:88)
root[ERROR]     at scala.util.Either.fold(Either.scala:190)
root[ERROR]     at fs2.CompositeFailure$.fromResults(CompositeFailure.scala:88)
root[ERROR]     at fs2.Stream.$anonfun$26$$anonfun$1$$anonfun$1(Stream.scala:1974)
root[ERROR]     at map @ fs2.Stream.$anonfun$26$$anonfun$1$$anonfun$1(Stream.scala:1975)
root[ERROR]     at get @ lepus.client.internal.ConnectionState$$anon$1.awaitOpened(ConnectionState.scala:107)
root[ERROR]     at get @ lepus.client.internal.ConnectionState$$anon$1.awaitOpened(ConnectionState.scala:107)
root[ERROR]     at flatMap @ fs2.Stream.$anonfun$26$$anonfun$1(Stream.scala:1975)
root[ERROR]     at get @ lepus.client.internal.ConnectionState$$anon$1.awaitOpened(ConnectionState.scala:107)
root[ERROR]     at get @ lepus.client.internal.ConnectionState$$anon$1.awaitOpened(ConnectionState.scala:107)
root[ERROR]     at flatMap @ fs2.Stream.$anonfun$26(Stream.scala:1975)
root[ERROR]     at get @ lepus.client.internal.ConnectionState$$anon$1.awaitOpened(ConnectionState.scala:107)
root[ERROR]     at complete @ lepus.client.internal.ConnectionState$$anon$1.onClosed(ConnectionState.scala:87)
root[ERROR]     at void @ lepus.client.internal.OutputWriter$$anon$1.onClose(OutputWriter.scala:44)
root[ERROR] Caused by: fs2.interop.scodec.CodecError: expected constant BitVector(8 bits, 0xce) but got BitVector(8 bits, 0x00)
root[ERROR]     at fs2.interop.scodec.CodecError$.apply(CodecError.scala:31)
root[ERROR]     at fs2.interop.scodec.StreamDecoder.loop$1$$anonfun$1(StreamDecoder.scala:102)
root[ERROR]     at fs2.Pull$$anon$1.cont(Pull.scala:149)
root[ERROR]     at fs2.Pull$.fs2$Pull$$$bindBindAux(Pull.scala:748)
root[ERROR]     at fs2.Pull$BindBind.cont(Pull.scala:735)
root[ERROR]     at fs2.Pull$ContP.apply(Pull.scala:683)
root[ERROR]     at fs2.Pull$ContP.apply$(Pull.scala:682)
root[ERROR]     at fs2.Pull$Bind.apply(Pull.scala:691)
root[ERROR]     at fs2.Pull$Bind.apply(Pull.scala:691)
root[ERROR]     at fs2.Pull$UnconsRunR$1.out$$anonfun$2(Pull.scala:1019)
root[ERROR]     at fs2.Pull$.interruptGuard$1$$anonfun$1(Pull.scala:952)
root[ERROR]     at get @ fs2.concurrent.SignallingRef$$anon$4.getAndDiscreteUpdatesImpl(Signal.scala:290)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
root[ERROR]     at flatMap @ fs2.Pull$.goCloseScope$1$$anonfun$1$$anonfun$3(Pull.scala:1216)
root[ERROR]     at update @ fs2.internal.Scope.releaseChildScope(Scope.scala:227)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
root[ERROR]     at update @ fs2.internal.Scope.releaseChildScope(Scope.scala:227)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
root[ERROR]     at main$ @ com.jmreardon.catsdashboard.Main$.main(Main.scala:10)
root[ERROR]     at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
hnaderi added a commit that referenced this issue Feb 21, 2023
@hnaderi
Copy link
Owner

hnaderi commented Feb 21, 2023

Thank you!
I thought I've handled all the errata, but apparently it wasn't handled.
I just pushed the fix, which will publish a snapshot release soon.

@hnaderi hnaderi closed this as completed Feb 21, 2023
@hnaderi hnaderi added the bug Something isn't working label Feb 21, 2023
@hnaderi hnaderi added this to the Revision 1 milestone Feb 21, 2023
@hnaderi
Copy link
Owner

hnaderi commented Feb 22, 2023

Fixed version is available on v0.1.1

@reardonj
Copy link
Author

Thanks! Tested and can confirm it is working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants