GithubHelp home page GithubHelp logo

setting custom options about bunnybus HOT 7 CLOSED

xogroup avatar xogroup commented on June 10, 2024
setting custom options

from bunnybus.

Comments (7)

WesTyler avatar WesTyler commented on June 10, 2024 1

Hey, sorry, this isn't being ignored. I'm hoping to take a look and have an answer for you this weekend most likely.

from bunnybus.

WesTyler avatar WesTyler commented on June 10, 2024 1

@YoannMa this should be available in version 3.1.0 now :) Thank you @mattcphillips for knocking that out!

from bunnybus.

WesTyler avatar WesTyler commented on June 10, 2024

Hey @YoannMa - so sorry for the delay! This is definitely not intended. We just utilized the underlying amqp options that we needed for our use case. Unless @dhinklexo disagrees I would consider the below options up for addition as pass-through properties. If you need this sooner rather than later you are welcome to open a PR. Otherwise, we will get this added on Apr 12th as part of our company OSS day. :)

Here is the full set of options that the amqp protocol can support (from here):

Used by RabbitMQ and sent on to consumers:

  • expiration (string): if supplied, the message will be discarded from a queue once it’s been there longer than the given number of milliseconds. In the specification this is a string; numbers supplied here will be coerced to strings for transit.
  • userId (string): If supplied, RabbitMQ will compare it to the username supplied when opening the connection, and reject messages for which it does not match.
  • CC (string or array of string): an array of routing keys as strings; messages will be routed to these routing keys in addition to that given as the routingKey parameter. A string will be implicitly treated as an array containing just that string. This will override any value given for CC in the headers parameter. NB The property names CC and BCC are case-sensitive.
  • priority (positive integer): a priority for the message; ignored by versions of RabbitMQ older than 3.5.0, or if the queue is not a priority queue (see maxPriority above).
  • persistent (boolean): If truthy, the message will survive broker restarts provided it’s in a queue that also survives restarts. Corresponds to, and overrides, the property deliveryMode.
  • deliveryMode (boolean or numeric): Either 1 or falsey, meaning non-persistent; or, 2 or truthy, meaning persistent. That’s just obscure though. Use the option persistent instead.

Used by RabbitMQ but not sent on to consumers:

  • mandatory (boolean): if true, the message will be returned if it is not routed to a queue (i.e., if there are no bindings that match its routing key).
  • BCC (string or array of string): like CC, except that the value will not be sent in the message headers to consumers.

Not used by RabbitMQ and not sent to consumers:

  • immediate (boolean): in the specification, this instructs the server to return the message if it is not able to be sent immediately to a consumer. No longer implemented in RabbitMQ, and if true, will provoke a channel error, so it’s best to leave it out.

Ignored by RabbitMQ (but may be useful for applications):

  • contentType (string): a MIME type for the message content
  • contentEncoding (string): a MIME encoding for the message content
  • headers (object): application specific headers to be carried along with the message content. The value as sent may be augmented by extension-specific fields if they are given in the parameters, for example, ‘CC’, since these are encoded as message headers; the supplied value won’t be mutated.
  • correlationId (string): usually used to match replies to requests, or similar
  • replyTo (string): often used to name a queue to which the receiving application must send replies, in an RPC scenario (many libraries assume this pattern)
  • messageId (string): arbitrary application-specific identifier for the message
  • timestamp (positive number): a timestamp for the message
  • type (string): an arbitrary application-specific type for the message
  • appId (string): an arbitrary identifier for the originating application

from bunnybus.

YoannMa avatar YoannMa commented on June 10, 2024

Awesome ! Thanks

I will try to come up with a PR before the 12th, I will ping here if I can't.

from bunnybus.

mattcphillips avatar mattcphillips commented on June 10, 2024

@WesTyler I'm going to pick this up and try to open a PR today unless @YoannMa says he's already started working on it.

from bunnybus.

WesTyler avatar WesTyler commented on June 10, 2024

Nope, you're good! He touched base with me this morning

from bunnybus.

WesTyler avatar WesTyler commented on June 10, 2024

Closed in 6365005

from bunnybus.

Related Issues (20)

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.