[
https://issues.apache.org/jira/browse/AMQNET-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13893180#comment-13893180
]
Shani Elharrar commented on AMQNET-470:
---------------------------------------
More on the use case :
I have a "pipeline" of 4 service types (Each service may have more then one
instance),
The first service get's information from outside source,he does some
processing, and sending it to a queue, which from the second service reads
information, and it goes on until the last service, Which writes down the
processed information to a database.
The pieces of informations that runs between the services have updates, But we
do know when the last update is arrived.
The way we use to scale the services horizontally is using the "Message Groups"
feature of Active MQ (Giving each message a message group id and sequence
number, We do add "-1" on the last update).
Because those services processes a lot of messages per second, We have inside
those services a lot of (async) actors which processes the messages and pass
them along, Until the last actor which sends the message to next "queue" (From
which the next server read and continues the process).
Because the asynchronous nature of those services, They have between 500 to
1000 messages (This can be modified) from the queue which they read from
messages in every given moment that haven't been Ack'ed, We're going to use
Individual Acks, And to "Ack" the messages after the've been sent to the
following queue. We do use persistent messaging, But it's to slow for this rate
of messages, So we want to force "async" send, And for this we need a callback
for every message that is sent, And in the callback we'll call the Ack.
Also I want to note that it's fine to process the same message again if one of
the services has fallen down and a message has been sent to the following
server but haven't been Ack'd. Those services can handle that.
> Allow Setting Callback after sending command asynchronously via Transport.
> --------------------------------------------------------------------------
>
> Key: AMQNET-470
> URL: https://issues.apache.org/jira/browse/AMQNET-470
> Project: ActiveMQ .Net
> Issue Type: New Feature
> Components: NMS
> Reporter: Shani Elharrar
> Assignee: Jim Gomes
> Priority: Minor
> Labels: easyfix, features, newbie
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Hi.
> I have a "system" that processes a lot of messages (~3000 per second)
> asynchronously. I'm trying to move to ActiveMQ as the primary message broker.
> My configuration is that I consume messages from ActiveMQ queue (Using
> individual Acks), I do some processing, And then send them to another queue
> (In the ActiveMQ). Transactions aren't so Important to me since I can handle
> message duplicates in case of crash. But I do want to Ack the messages only
> after I send them to the ActiveMQ.
> So I want to have a Callback after sending the message Asynchronously to
> ActiveMQ.
> I managed to edit NMS code to support this, What i've done is :
> * Added "Callbackable" interface with one property (setter & getter) which is
> a delegate equivalent to Action (void, empty arguments).
> * Modified Command and IActiveMQMessage to "extend" that interface
> * Modified CommandBase to implement the interface (Trivial setter/getter)
> * Modified TCPTransport.Oneway method to check if the callback isn't null and
> if not - invoke it (After it marshals the message).
> And it worked flawlessly.
> First of all, I need you to vote in/against the feature, And if it's accepted
> - I'm willing to create a patch for this.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)