Akka/JVM Client - Position/Long vs EventNumber/Int

I am using ES 3.0.1 and Akka/JVM Client 1.0.1.

When comparing StreamSubscriptionActor using EventNumber vs SubscriptionActor using Position I noticed EventNumber is stored as an Int whereas Position is stored as a Long wouldn’t this cause issues for reading events using StreamSubscriptionActor after Int.MaxValue or are Streams limited by Int.MaxValue on the Event Store side?

Thanks for the great library and database and let me know if there are anything I can contribute.

https://github.com/EventStore/EventStore.JVM/blob/master/src/main/scala/eventstore/EventNumber.scala

https://github.com/EventStore/EventStore.JVM/blob/master/src/main/scala/eventstore/Position.scala

is int.maxvalue a big concern? we are about to expose our internal
join operation but how many events do you have?

1 event per video view. ;-p

[context: http://www.reddit.com/r/news/comments/2o0z0q/psy_breaks_youtube_view_counter_with_gangam_style/]

Is is not a major concern at this point. Just trying to plan out how our streams should be partitioned and understanding the differences between EventNumber and Position. Currently in development with one stream looking like it could be used for years before needing to create a new one. We only need to replay a few days worth of events with a Catching up subscription on restarts.

Thanks

Hi Samuel,

Some notes regarding Position and EventNumber - those are different by design, you should never try to convert Position to EventNumber and vice versus.
Position is more like internal value of positioning event in global/internal stream.

EventNumber (sequenceNumber) - concrete index of event in the concrete stream.

‘subscribeToAllFrom’ method takes Position and produces IndexedEvent, while ‘subscribeToStreamFrom’ takes EventNumber and produces Event

You can see that you can get Position from IndexedEvent to catchup after restart as well as you can take indexedEvent.event.eventNumber. However you can’t get position from event itself.