Coder Social home page Coder Social logo

nim-amqp's People

Contributors

benumbed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

enthus1ast

nim-amqp's Issues

Infinite loop (in a receive call) when network connection goes away.

I'm connecting through an SSH tunnel to my RabbitMQ server.
When i kill the SSH tunnel (to simulate a network outage).
The consumer (basic consumer example) goes into an endless loop.
I've not found the receive that does this yet but an strace reveals the issue:

stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2298, ...}) = 0
getpid()                                = 19840
write(1, "\33[92mDBG\33[0m 2020-09-19 23:51:04"..., 176) = 176
rt_sigaction(SIGINT, {sa_handler=0x561c3770e866, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f65e81116a0}, {sa_handler=0x561c3765d107, sa_mask=[INT], sa_flags=SA_RESTOR      ER|SA_RESTART, sa_restorer=0x7f65e81116a0}, 8) = 0
#
# Somwhere here i killed the SSH tunnel
#
select(7, [6], NULL, NULL, NULL)        = 1 (in [6])
select(7, [6], NULL, NULL, {tv_sec=0, tv_usec=500000}) = 1 (in [6], left {tv_sec=0, tv_usec=499997})
recvfrom(6, "", 4000, 0, NULL, NULL)    = 0
select(7, [6], NULL, NULL, NULL)        = 1 (in [6])
select(7, [6], NULL, NULL, {tv_sec=0, tv_usec=500000}) = 1 (in [6], left {tv_sec=0, tv_usec=499998})
recvfrom(6, "", 4000, 0, NULL, NULL)    = 0
# Endless loop from here on .....

if i have better infos, i'll report

If message payload is empty, msgHandler is not called

When the payload is empty the msgHandler is not called,
so there is no way to ack manualy and RabbitMQ reports them as "Unacked".

The output thats generated is (for each message):

DBG 2020-09-19 22:25:10.470+02:00 Content Header                             tid=13830 classId=60 weight=0 bodySize=0 propFlags=12288
DBG 2020-09-19 22:25:10.470+02:00 basic.deliver                              tid=13830 consumerTag=amq.ctag-2XyR-_2D_Jv73iYKzOCH9w deliveryTag=8 redelivered=true exchangeName= routingKey=youtube_song

i basically use your example consumer (with my logic added in the handler), if you need more information please say so.
(could be that i've missed something :) )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.