Giter Club home page Giter Club logo

amqp's People

Contributors

ja7ad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mar-coding

amqp's Issues

implement delay concept for nack or rejected message

Describe the problem you'd like to have solved

Your consumer can not handle the received message and you need to reject it. If you reject the message with requeue being true, it will be instantly redelivered to your consumer, resulting in very high workload, as your consumer will reject that message.

Describe the ideal solution

flowchart

The RabbitMQ Delay Message Plugin adds a new exchange type to RabbitMQ that allows messages routed through that exchange to be delayed if the user so desires. Let us see how the deployment and scheduling go with these 2 methods.

rabbitmq-plugins enable rabbitmq_delayed_message_exchange

publish or delivery message with auto encoder/decoder registered

Describe the problem you'd like to have solved

We want support auto encoder and decoder json, gob and protobuf.

for example: https://github.com/nats-io/nats.go/tree/main/encoders/builtin

Describe the ideal solution

when create New() we register default encoder for auto encode and decode then base options we can customize to another encoder type.

  • for consumer on types.Delivery we have a unmarshaler interface to decode message body on specific value with any type.
  • for publisher get data with any type from body then encode auto base on registered encoder, encode body and publish message.

close channel manager on re connection in publisher

I am experiencing an unknown issue with the close channel during the reconnection of the publisher.

message 0 publised
message 1 publised
message 2 publised
message 3 publised
[2023/11/28 09:51:14] WARN attempting to reconnect to amqp server after close with error: Exception (501) Reason: "read tcp 192.168.0.10:54974->65.109.234.125:5672: i/o timeout" {"source":{"file":"/home/javad/Projects/go/personal/amqp/channel.go","function":"github.com/Ja7ad/amqp.(*channel).startNotifyCancelOrClosed","line":63}}
[2023/11/28 09:51:14] ERROR attempting to reconnect to amqp server after connection close with error: Exception (501) Reason: "read tcp 192.168.0.10:54974->65.109.234.125:5672: i/o timeout" {"source":{"file":"/home/javad/Projects/go/personal/amqp/connection.go","function":"github.com/Ja7ad/amqp.(*connection).startNotifyClose","line":51}}
[2023/11/28 09:51:15] WARN waiting 5s seconds to attempt to reconnect to amqp server {"source":{"file":"/home/javad/Projects/go/personal/amqp/channel.go","function":"github.com/Ja7ad/amqp.(*channel).reconnectLoop","line":93}}
2023/11/28 09:51:24 Exception (504) Reason: "channel/connection is not open"

The reconnection channel manager does not have issues with the consumer and continues to run in the background to return to a normal state, but it encounters issues with the publisher during the close on reconnection.

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.