akka as MQs

153 views
Skip to first unread message

Behrad Zari

unread,
Sep 1, 2014, 1:23:04 AM9/1/14
to akka...@googlegroups.com
I'm new to akka, since I have some Erlang experience it was looking familiar for me at first step. We are going to rewrite a SMS aggregator/gateway whose job is to route messages between different SMSC endpoints. I'm trying to it with least complexity (akka + camel) without any Message Broker involved.
I want to here your points How well can akka play a message broker role in my case? 

We will be charged twice if we send a message twice (don't think we want at-least-once reliability)
We need some reliability and failover not to miss many messages.
We may need priority Queues as well later.

Martynas Mickevičius

unread,
Sep 6, 2014, 5:20:17 AM9/6/14
to akka...@googlegroups.com
Hi Behard,

for reliability on fail-over you can use PersistentActor with AtLeastOnceDelivery trait. For priority management you can look at Mailbox implementations that support priority handling.


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Martynas Mickevičius
TypesafeReactive Apps on the JVM

Behrad Zari

unread,
Sep 15, 2014, 9:06:05 AM9/15/14
to akka...@googlegroups.com
thank you Martynas,
I wrote a sample, and two unclear  points for me on "deleteMessages( toSeqId )".  
1) How should application logically/priodically delete messages in a high load environment? Can't we hook into confirmDelivery method so that every confirmed message gets deleted?
2) Can default performance handle around a few million undelivered message in consumer down times?

Patrik Nordwall

unread,
Sep 16, 2014, 5:17:15 AM9/16/14
to akka...@googlegroups.com
On Mon, Sep 15, 2014 at 3:06 PM, Behrad Zari <beh...@gmail.com> wrote:
thank you Martynas,
I wrote a sample, and two unclear  points for me on "deleteMessages( toSeqId )".  
1) How should application logically/priodically delete messages in a high load environment? Can't we hook into confirmDelivery method so that every confirmed message gets deleted?

When you call confirmDelivery you can also call deleteMessages. For performance reasons it should probably not be done for each individual message.
 
2) Can default performance handle around a few million undelivered message in consumer down times?

The undelivered messages are kept in memory and at some point you will reach the limit. The AtLeastOnceDelivery.UnconfirmedWarning message is an indication that things are failing. There is also a hard limit defined by maxUnconfirmedMessages.

/Patrik



--

Patrik Nordwall
Typesafe Reactive apps on the JVM
Twitter: @patriknw

Behrad

unread,
Sep 16, 2014, 5:45:17 AM9/16/14
to akka...@googlegroups.com
Thank you Patrik,

Then the application should itself track of sequences!? For example call deleteMessages when reached to sequenceId N !?
And what happens when deleteMessage( 1000 ) is called and messages with seqId 900 and 950 are unconfirmed !? are they deleted too? or I only empty delivered history !?
You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/OeeKkyW12tY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


--
--Behrad

Patrik Nordwall

unread,
Sep 16, 2014, 6:53:49 AM9/16/14
to akka...@googlegroups.com
On Tue, Sep 16, 2014 at 11:45 AM, Behrad <beh...@gmail.com> wrote:
Thank you Patrik,

Then the application should itself track of sequences!? For example call deleteMessages when reached to sequenceId N !?
And what happens when deleteMessage( 1000 ) is called and messages with seqId 900 and 950 are unconfirmed !? are they deleted too? or I only empty delivered history !?

Good point. Better to use saveSnapshot followed by deleteMessages.
/Patrik
Reply all
Reply to author
Forward
0 new messages