You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2014/02/05 15:54:13 UTC
[jira] [Commented] (AMQNET-470) Allow Setting Callback after
sending command asynchronously via Transport.
[ https://issues.apache.org/jira/browse/AMQNET-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13892160#comment-13892160 ]
Timothy Bish commented on AMQNET-470:
-------------------------------------
This doesn't really seem like the best idea. Can you elaborate on the use case a bit. The send method for a persistent message returns only after receiving an ack from the broker, where a send for a non-persistent message returns immediately. You can force sync sends always via configuration or async sends always as well.
> 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
> 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)