Re: [akka-user] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?

2015-02-22 Thread Akka Team
Thanks a lot for noticing and pulling through with the PR (now merged)!

On Sun, Feb 15, 2015 at 2:04 PM, Paweł Kaczor 
wrote:

> I created a ticket: https://github.com/akka/akka/issues/16874
> and pull request: https://github.com/akka/akka/pull/16877
>
> Cheers,
> Pawel
>
> --
> >> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>  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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?

2015-02-15 Thread Paweł Kaczor
I created a ticket: https://github.com/akka/akka/issues/16874 
and pull request: https://github.com/akka/akka/pull/16877

Cheers,
Pawel

-- 
>>  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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?

2015-02-13 Thread Patrik Nordwall
On Fri, Feb 13, 2015 at 2:14 PM, Paweł Kaczor 
wrote:

> Hi Patrik,
> thanks for your answer. Yes, I implemented mapping function that accepts
> akka's deliveryId (not my own deliveryId). I think documentation (cited
> above) is misleading ( "A function can be created to map your own
> messageId to deliveryId")   (?)
>

I agree, that can be clarified. You will have a Map(messageId ->
deliveryId). Would you mind creating an issue
 and perhaps also a pull request?

/Patrik


>
>
> Cheers,
> Pawel
>
> On Friday, February 13, 2015 at 1:39:08 PM UTC+1, Patrik Nordwall wrote:
>>
>> Hi Pawel,
>>
>> Did you find a solution?
>>
>> It is not possible to define your own deliveryId that is used for
>> correlating the deliver and confirmDelivery methods. That would open up for
>> too many mistakes. What you can do is to maintain a mapping between your
>> identifier and the provided deliveryId. Then you can send your identifier
>> in the message to the destination, and when you receive the acknowledgment
>> message you can map that back to the deliveryId to be used when calling
>> confirmDelivery.
>>
>> Cheers,
>> Patrik
>>
>> On Fri, Feb 6, 2015 at 12:20 PM, Akka Team  wrote:
>>
>>> Hi Pawel,
>>>
>>> What is the exact problem here? I am a bit slow today, so I might just
>>> have missed the obvious, but explaining in detail would help :)
>>>
>>> -Endre
>>>
>>> On Wed, Feb 4, 2015 at 10:32 AM, Paweł Kaczor 
>>> wrote:
>>>
 According to http://doc.akka.io/docs/akka/snapshot/scala/persistence.
 html#Relationship_between_deliver_and_confirmDelivery
 : "A function can be created to map your own messageId to deliveryId,
 which may come from your own domain model. This function must keep track of
 which messageId have been acknowledged. Alternatively, the Persistence
 module provides a default sequence number implementation which can also be
 used as the deliveryId for messages. The default sequence increases
 monotonically, without gaps."

 I would like to be able to use my own deliveryId. It is not possible
 with current implementation (see code below).

 trait AtLeastOnceDelivery {

   private def nextDeliverySequenceNr(): Long = {...}

   def deliver(): Unit  = {
 ...
 val deliveryId = nextDeliverySequenceNr()
 ...
   }
 }

 Pawel

  --
 >> 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.

>>>
>>>
>>>
>>> --
>>> Akka Team
>>> Typesafe - The software stack for applications that scale
>>> Blog: letitcrash.com
>>> Twitter: @akkateam
>>>
>>> --
>>> >> 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.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Typesafe  -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>> [image: Scala Days] 
>>
>>   --
> >> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

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

[image: Scala Days] 

-- 
>>  Read the docs: http://akka.io/docs/

Re: [akka-user] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?

2015-02-13 Thread Paweł Kaczor
Hi Patrik,
thanks for your answer. Yes, I implemented mapping function that accepts 
akka's deliveryId (not my own deliveryId). I think documentation (cited 
above) is misleading ( "A function can be created to map your own messageId
 to deliveryId")   (?)


Cheers,
Pawel

On Friday, February 13, 2015 at 1:39:08 PM UTC+1, Patrik Nordwall wrote:
>
> Hi Pawel,
>
> Did you find a solution?
>
> It is not possible to define your own deliveryId that is used for 
> correlating the deliver and confirmDelivery methods. That would open up for 
> too many mistakes. What you can do is to maintain a mapping between your 
> identifier and the provided deliveryId. Then you can send your identifier 
> in the message to the destination, and when you receive the acknowledgment 
> message you can map that back to the deliveryId to be used when calling 
> confirmDelivery.
>
> Cheers,
> Patrik
>
> On Fri, Feb 6, 2015 at 12:20 PM, Akka Team  > wrote:
>
>> Hi Pawel,
>>
>> What is the exact problem here? I am a bit slow today, so I might just 
>> have missed the obvious, but explaining in detail would help :)
>>
>> -Endre
>>
>> On Wed, Feb 4, 2015 at 10:32 AM, Paweł Kaczor > > wrote:
>>
>>> According to 
>>> http://doc.akka.io/docs/akka/snapshot/scala/persistence.html#Relationship_between_deliver_and_confirmDelivery
>>> : "A function can be created to map your own messageId to deliveryId, 
>>> which may come from your own domain model. This function must keep track of 
>>> which messageId have been acknowledged. Alternatively, the Persistence 
>>> module provides a default sequence number implementation which can also be 
>>> used as the deliveryId for messages. The default sequence increases 
>>> monotonically, without gaps."
>>>
>>> I would like to be able to use my own deliveryId. It is not possible 
>>> with current implementation (see code below).
>>>
>>> trait AtLeastOnceDelivery {
>>>
>>>   private def nextDeliverySequenceNr(): Long = {...}
>>>
>>>   def deliver(): Unit  = {
>>> ...
>>> val deliveryId = nextDeliverySequenceNr()
>>> ...
>>>   }
>>> }
>>>
>>> Pawel
>>>
>>>  -- 
>>> >> 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.
>>>
>>
>>
>>
>> -- 
>> Akka Team
>> Typesafe - The software stack for applications that scale
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>  
>> -- 
>> >> 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.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Typesafe  -  Reactive apps on the JVM
> Twitter: @patriknw
>
> [image: Scala Days] 
>
> 

-- 
>>  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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?

2015-02-13 Thread Patrik Nordwall
Hi Pawel,

Did you find a solution?

It is not possible to define your own deliveryId that is used for
correlating the deliver and confirmDelivery methods. That would open up for
too many mistakes. What you can do is to maintain a mapping between your
identifier and the provided deliveryId. Then you can send your identifier
in the message to the destination, and when you receive the acknowledgment
message you can map that back to the deliveryId to be used when calling
confirmDelivery.

Cheers,
Patrik

On Fri, Feb 6, 2015 at 12:20 PM, Akka Team  wrote:

> Hi Pawel,
>
> What is the exact problem here? I am a bit slow today, so I might just
> have missed the obvious, but explaining in detail would help :)
>
> -Endre
>
> On Wed, Feb 4, 2015 at 10:32 AM, Paweł Kaczor 
> wrote:
>
>> According to
>> http://doc.akka.io/docs/akka/snapshot/scala/persistence.html#Relationship_between_deliver_and_confirmDelivery
>> : "A function can be created to map your own messageId to deliveryId,
>> which may come from your own domain model. This function must keep track of
>> which messageId have been acknowledged. Alternatively, the Persistence
>> module provides a default sequence number implementation which can also be
>> used as the deliveryId for messages. The default sequence increases
>> monotonically, without gaps."
>>
>> I would like to be able to use my own deliveryId. It is not possible with
>> current implementation (see code below).
>>
>> trait AtLeastOnceDelivery {
>>
>>   private def nextDeliverySequenceNr(): Long = {...}
>>
>>   def deliver(): Unit  = {
>> ...
>> val deliveryId = nextDeliverySequenceNr()
>> ...
>>   }
>> }
>>
>> Pawel
>>
>>  --
>> >> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Akka Team
> Typesafe - The software stack for applications that scale
> Blog: letitcrash.com
> Twitter: @akkateam
>
> --
> >> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

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

[image: Scala Days] 

-- 
>>  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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?

2015-02-06 Thread Akka Team
Hi Pawel,

What is the exact problem here? I am a bit slow today, so I might just have
missed the obvious, but explaining in detail would help :)

-Endre

On Wed, Feb 4, 2015 at 10:32 AM, Paweł Kaczor 
wrote:

> According to
> http://doc.akka.io/docs/akka/snapshot/scala/persistence.html#Relationship_between_deliver_and_confirmDelivery
> : "A function can be created to map your own messageId to deliveryId,
> which may come from your own domain model. This function must keep track of
> which messageId have been acknowledged. Alternatively, the Persistence
> module provides a default sequence number implementation which can also be
> used as the deliveryId for messages. The default sequence increases
> monotonically, without gaps."
>
> I would like to be able to use my own deliveryId. It is not possible with
> current implementation (see code below).
>
> trait AtLeastOnceDelivery {
>
>   private def nextDeliverySequenceNr(): Long = {...}
>
>   def deliver(): Unit  = {
> ...
> val deliveryId = nextDeliverySequenceNr()
> ...
>   }
> }
>
> Pawel
>
>  --
> >> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>  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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.