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



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

[image: Scala Days] <http://event.scaladays.org/scaladays-sanfran-2015>

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

Reply via email to