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

Support for persistent messages #93

Closed
behrad opened this issue Jun 22, 2017 · 10 comments
Closed

Support for persistent messages #93

behrad opened this issue Jun 22, 2017 · 10 comments
Assignees
Labels

Comments

@behrad
Copy link

behrad commented Jun 22, 2017

Can persistent option be added here https://github.com/senecajs/seneca-amqp-transport/blob/develop/lib/client/publisher.js#L31 to support for durable micro-service messaging?

That would be very nice, since I've not seen any other seneca plugin to support that. Does any?

@nfantone nfantone self-assigned this Jun 27, 2017
@nfantone
Copy link
Collaborator

@behrad Not a bad idea at all. Many thanks for the suggestion.

Will work on it now and keep you posted!

@nfantone
Copy link
Collaborator

nfantone commented Jun 28, 2017

@behrad Would you like to try the feature out before releasing? Here: #96

Let me know about your feedback.

@behrad
Copy link
Author

behrad commented Jun 28, 2017

Great to hear from you. I'll give it a try 👍

it suddenly came to my mind, for persistent messages to work, queue should not be exclusive if I'm right.
Is queue's exclusive-ness configurable, as documentation states otherwise.

another question, have you got any number performance wise? pub/sec? consume/sec?

@nfantone
Copy link
Collaborator

nfantone commented Jun 28, 2017

@behrad Thank you very much, indeed.

Is queue's exclusive-ness configurable, as documentation states otherwise.

Queues' declaration parameters are completely configurable. "exclusive": true is the default value, but you may change that by supplying a client.queues.optionsor listener.queues.options argument via .use() or .client()/.listen() methods.

{
      // ...
      "queues": {
        "prefix": "seneca.act",
        "separator": ".",
        "options": {
          "autoDelete": true,
          "exclusive": true, // <-- This is what you are interested in
          "arguments": {
            "x-dead-letter-exchange": "seneca.dlx",
            "x-message-ttl": 10000
          }
        }
      }
}

another question, have you got any number performance wise? pub/sec? consume/sec?

Those greatly depend on your specs and your broker's current load/capacity. They are not hard to come by: run a few of the /examples and produce some numbers. They'll serve as a hint, but will be largely artificial, mind you. I know it's a no-brainer, but best way would be to run it in your production env and crunch the actual values.

@nfantone
Copy link
Collaborator

nfantone commented Jul 3, 2017

@behrad So, did you get a chance to try the PR? Or shall I merge regardless?

@nfantone
Copy link
Collaborator

nfantone commented Jul 6, 2017

Added in v2.2.0.

@nfantone nfantone closed this as completed Jul 6, 2017
@behrad
Copy link
Author

behrad commented Jul 7, 2017

so busy these days @nfantone
What about I test the merged release, and let you know if any issues?

@behrad
Copy link
Author

behrad commented Jul 7, 2017

👍 thank you man

@behrad
Copy link
Author

behrad commented Jul 9, 2017

I tested 2.2.0 @nfantone and it looks great, however I've two main concerns:

  1. Seneca client'a act is timed out when consumer is not running (the message will persist and be consumed by seneca listener later). In this case, can we increase act timeout to hours? minutes? to have a complete REQ/REP model?
    Related to the above, let me ask a general Senecajs question:
    Can seneca support a non req/rep model? like workers or pub/sub, ...? I mean a case where act is not looking for a reply callback.

  2. I benchmarked a Seneca mesh act as around 20ms in on the loopback address.
    and Seneca amqp is around 45ms. Numbers look poor to me. Am i missing something?

@nfantone
Copy link
Collaborator

@behrad For point number one, please take a look at this issue.

Regarding your second point, I'm not familiar with seneca-mesh but, from what I saw, it's using HTTP as its default transport. Running HTTP on local LAN would beat queuing messages in an AMQP broker any day. Plus, persistence messages and queues with confirms are particularly slow in RabbitMQ (see this also).

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