Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 07 2019 01:26
    scullxbones commented #216
  • Jan 06 2019 15:04
    thjaeckle commented #216
  • Jan 06 2019 14:58
    thjaeckle synchronize #216
  • Jan 06 2019 02:53
    scullxbones commented #216
  • Jan 04 2019 15:08
    thjaeckle synchronize #216
  • Jan 04 2019 12:02
    thjaeckle synchronize #216
  • Jan 04 2019 11:10
    thjaeckle opened #216
  • Jan 03 2019 15:52
    pepite commented #214
  • Jan 03 2019 15:09
    scullxbones commented #214
  • Jan 03 2019 15:01
    scullxbones commented #215
  • Jan 03 2019 14:25
    thjaeckle opened #215
  • Jan 03 2019 09:29
    gbrd commented #193
  • Jan 02 2019 22:03
    pepite commented #214
  • Jan 02 2019 21:33
  • Jan 02 2019 15:50
    gbrd commented #193
  • Jan 02 2019 15:50
    gbrd commented #193
  • Jan 02 2019 15:48
    yahor-filipchyk commented #37
  • Jan 02 2019 15:12
    thjaeckle commented #193
  • Jan 02 2019 15:01
    gbrd commented #193
  • Dec 29 2018 14:14
    scullxbones commented #37
Parker
@parkersavi
@scullxbones I am using your library and under high load, I receive following error "Persistence failure when replaying events for persistenceId . Last known sequence number [0]
! akka.pattern.CircuitBreakerOpenException: Circuit Breaker is open; calls are failing fast"
it doesn't happen when i do inserts. Happens only when i try to replay the events from mongo. I am using casbah journal. I am using akka 2.5 and casbah 1.3.6
Brian Scully
@scullxbones
hi @parkersavi - I don't understand casbah 1.3.6 - which version of the plugin are you using, should be a 2.x series? Early on in the project, I added a circuit breaker to the plugin. At some point later the akka team added their own circuit breaker a layer up inside akka-persistence and they didn't play well together, so I removed the one from the plugin in #168. Are you using that version (pre 2.0.4) of the plugin?
Parker
@parkersavi
sorry I meant akka-persistence-mongo-casbah 1.3.6 and not 2.x series
it works fine with 1.3.6 but seeing missing class/method related errors when i upgrade to 2.x series of mongo-casbah
Brian Scully
@scullxbones
Hmm ok. The 2.x series is what is meant to be used with akka 2.5. The missing class/method errors - are they on the casbah side? Which casbah version are you using?
Brian Scully
@scullxbones
the casbah plugin is compiled against casbah version 3.1.1 so that version should work. other older versions may work as well
Parker
@parkersavi
so here are my dependencies
<akka.version>2.5.1</akka.version>
<artifactId>casbah-commons_2.11</artifactId> <version>3.1.0</version>
<artifactId>casbah-core_2.11</artifactId> <version>3.1.0</version>
<artifactId>casbah-query_2.11</artifactId>
<version>3.1.0</version>
<artifactId>akka-persistence-mongo-casbah_2.11</artifactId>
<version>1.3.6</version>
now if i upgrade akka-persistence-mongo-casbah_2.11 to 2.2.3 I get following error:
java.lang.NoSuchMethodError: akka.serialization.Serialization$.withTransportInformation(Lakka/actor/ExtendedActorSystem;Lscala/Function0;)Ljava/lang/Object;
Parker
@parkersavi
As I mentioned earlier, akka-persistence-mongo-casbah_2.11 1.3.6 would just work fine under normal load. However, under heavy load I get this error Persistence failure when replaying events for persistenceId . Last known sequence number [0] ! akka.pattern.CircuitBreakerOpenException: Circuit Breaker is open; calls are failing fast
Brian Scully
@scullxbones
ok - 1.x series isn't supported for akka 2.5 though. I see #179 which is probably related the the error you're seeing
which was related to akka/akka#24321 - so akka 2.5.1 isn't compatible with 2.0.5+ of the journal plugin
if you still want to stick with 1.3.6 you can configure the plugin's circuit breaker to be much less sensitive from docs here
Brian Scully
@scullxbones
but you may / will see bad interactions between the two as mentioned by the frustrated user in #168
I will update the README.md to take not of the minimum 2.5.12 version of akka though
Parker
@parkersavi
yes i see 179 happening with me. i played around with the circuit breaker timeouts but no luck. I am going to see if can get akka 2.5 and journal 2.0.5+ to work
Brian Scully
@scullxbones
2.5.12 is the minimum akka version you need
Parker
@parkersavi
aah ok. let me try that
Brian Scully
@scullxbones
:+1:
Parker
@parkersavi
thanks for helping out. I'll update soon
rurikovich
@rurikovich

Hello, I'm trying to start my akka cluster with persistence on new PC and got error in mongodb:

Persistence failure when replaying events for persistenceId [User-login37]. Last known sequence number [0] com.mongodb.MongoCommandException: Command failed with error -1: 'collection already exists' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "collection already exists"}

on my own laptop this example works fine. What can be the problem ?

Neil J. L. Benn
@njlbenn
Hi there :hand: , I wanted to ask a question about a part of the code related to the rxmongo driver: https://github.com/scullxbones/akka-persistence-mongo/blob/master/rxmongo/src/main/scala/akka/contrib/persistence/mongodb/RxMongoReadJournaller.scala#L307
It looks to me like it reads the entire realtime Mongo collection on start up and then does the filtering in the application -- rather than sending the offset ID as part of the Mongo query.
Is that a deliberate design?
I was wondering because for the CurrentEventsByTag query we do send the offset ID as part of the Mongo query: https://github.com/scullxbones/akka-persistence-mongo/blob/master/rxmongo/src/main/scala/akka/contrib/persistence/mongodb/RxMongoReadJournaller.scala#L122
So I was wondering if the startup query-behaviour should be the same for both the journal and the realtime collections
Brian Scully
@scullxbones

Hi @njlbenn - I can't think of a good reason why these would be different, other than maybe one (current) got fixed and the other didn't.

it reads the entire realtime Mongo collection on start up

it does filter by tag, but you're right it still reads < offset off disk just to discard the documents on the scala side

hi @rurikovich - are you still seeing this error? missed your chat message
Neil J. L. Benn
@njlbenn
@scullxbones thanks for the reply :thumbsup: . If I get a chance maybe I'll do a quick PR to fix that. nothing urgent of course, just might be a useful optimisation.
James Brems
@JamesBrems78_twitter
Hello,
@scullxbones: If I do not change the default setting for connection pool (https://github.com/scullxbones/akka-persistence-mongo/blob/master/scala/src/main/resources/reference.conf), it is max. 100 connections. As the driver is setting up 2 connections (event journal + snapshots), does it open max. 200 DB connections then? Or do journal and snapshots share the max DB connections?
Gaël Bréard
@gbrd
Hi, scala driver seems not use optimisation "snapshot cache" is there a reason ?
Gaël Bréard
@gbrd
(open PR #261 for that)
Brian Scully
@scullxbones
@JamesBrems78_twitter - the pools should be shared between journal and snapshots due to the shared ScalaMongoDriver instance.
James Brems
@JamesBrems78_twitter
@scullxbones : ok thanks. Does akka-persistence-mongo write an mbean or a log where I could monitor the number of active DB connections?
Brian Scully
@scullxbones

@JamesBrems78_twitter sorry lost track of this.

No, if that capability existed it would be inside the actual driver i think. This plugin exposes some dropwizard timing metrics, but the driver internals are a black box.

Fabian Page
@fabianpage
Hi
I'm trying to write an eventadapter with akka-persistence-mongo. Has somebody an example how to do that? (My manifest, toJournal and fromJournal functions are never called)
Fabian Page
@fabianpage
(Also if i try to make a binding to "reactivemongo.bson.BSONDocument" i don't get any calls on my fromJournal or toJournal methods)
akka-contrib-mongodb-persistence-journal {
event-adapters {
user-time-booking-edited = "models.UserTimeBookingEdited_V1_V2"
}
event-adapter-bindings {
"models.UserTimeBookingEdited" = user-time-booking-edited
"reactivemongo.bson.BSONDocument" = user-time-booking-edited
}
}
Fabian Page
@fabianpage
I found my error, the event-adapter-bindings have to point to the sealed trait not to the case class which extends this sealed trait.
Scot Mcphee
@scotartt
Hello @scullxbones I want to switch my DynamoDB persistence in akka over to use MongoDB, using the reactive driver version. I'm running Akka 2.5x on AWS Corretto JDK 8. But my MongoDB is Mongo DB Atlas, which is usually a 4.0 or 4.2 version of Mongo. The documentation only seems to go up to v3.6 of Mongo. Is MongoDB 4.2 supported? And can I use the 'mongodb+srv://' format connection strings which Atlas requires?
Brian Scully
@scullxbones

Hi @scotartt - we currently verify the test suite on mongo versions 3.0 to 3.6. I haven't had a chance to update the travis configuration to run the suite against 4.0 or 4.2, but given the core subset of mongo's APIs and query language we use i'd be surprised if the plugin didn't work on those.

Atlas SNI urls are supported as of PR #194, this should be available for any of the 3 drivers supported by the plugin.

Scot Mcphee
@scotartt
Thanks for the info, I'll report back my experiences setting it up with Atlas.
Vikram
@vikram_darsi_twitter
Hi Team, we currently use default akka persistence plugin "leveldb" and planning to mirgate to mongodb, can someone please provide the link of akka.conf/reference.conf where journal and snapshots plugin refers to mongodb's?
Brian Scully
@scullxbones
@vikram_darsi_twitter here's a link to the docs covering installation and configuration for akka 2.5