Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Anil Gursel
yes, we have quite a few use cases that uses Kafka. We use Alpakka Kafka Connector https://doc.akka.io/docs/akka-stream-kafka/current/ along with Perpetual Stream https://squbs.readthedocs.io/en/latest/perpetualstream/
Alpesh Patel
@anilgursel There is no clear example or library with perpetualstream..can you please guide me
I am getting confuse between akka and scubs ..Do you have any archive which i can refer
Anil Gursel
squbs is built on Akka. What Perpetual Stream provides is a way to hook into squbs application startup/shutdown lifecycle. For instance, one may not prefer to start consuming from Kafka until rest of the application is up and ready.. or to gracefully shutdown the stream when the app is shutting down. PerpetualStream integrates with lifecycle events automatically and starts/shutsdown the stream based on those.
I would suggest reading the doc. Other than that, I do not thnk there is an example code of it.
Alpesh Patel
@anilgursel ..I tried to use the example but i don't see any config for kafka or messaging queue
Anil Gursel
Because PerpetualStream is not specific to Kafka. For Kafka specific configuration please see Alpakka documentation.
Jason Carreira
Has anyone looked at integrating Akka Typed with Squbs?
Anil Gursel
Unfortunately, not yet.
Jason Carreira
Any comparisons of Squbs to Lagom?
Anil Gursel
there is no doc that compares the feature sets, I do not know if it is something that can directly be compared though. squbs tries to stick to Akka and Akka HTTP API.
Jason Carreira
Okay, thanks. Going through the docs trying to understand the feature set
Jason Carreira
I see that akka-contrib and Aggregator has been deprecated as of Akka 2.5 ( https://doc.akka.io/docs/akka/2.5.3/scala/project/migration-guide-2.4.x-2.5.x.html )
Aggregator is the basis of the Orchestrator DSL, so what's the plan there?
Anil Gursel
If I am not wrong, aggregator was contributed to Akka by @akara (he is the creator of squbs). So, when aggregator becomes unavailable from Akka, we can pull it in to squbs. Haven’t decided on a plan on that yet.
It seems that when the circuit breaker is open, it just bypasses the wrapped flow, pushes a failure downstream, and pulls the next element. That is, there is no backpressure when the circuit is open. Am I understanding that correctly? And if so, why wouldn’t we to apply backpressure until the circuit closes?
sakshi ganeriwal
@akara @anilgursel is there some way in which i can restart my squbs app through a config?
Like we have a use case where if we add a new topic to the config file we want to restart the app. So, is there a way in which i can configure an auto app restart??
Akara Sucharitakul
@sakshiganeriwal I'd say no, especially in your circumstances. Allowing a config to trigger a restart can be a dangerous feature. It is better if the config just has the metadata saying restart required. It also allows you to change multiple configs and restart. So I'd keep these separate actions.
Anil Gursel
@jacobg The last section of https://squbs.readthedocs.io/en/latest/circuitbreaker/ talks about it little bit. Depending on the use case, it may not always be the best option to back pressure. What if a an alternate service calls is used when the circuit is open for instance.
Mudit Sinha
Would it be a good feature to add an OrderedCircuitBreaker? Currently the documentation says the CircuitBreaker might potentially change the order of messages.
Anil Gursel
you can take a look at https://squbs.readthedocs.io/en/latest/flow-ordering/ and potentially combine the two or create a new stage that does both.. the important thing to keep in mind is what happens when elements come out-of-order and a specific element is dropped etc.
Sherif Ebady
squbs release milestone 0.13.0 is now available on Maven central for scala 2.11 and 2.12 https://search.maven.org/search?q=g:org.squbs
Victor Vieira Barros Lea da Silveira

Hello everyone, I am new here =D and I am starting to use squbs Persistent Buffer for disk persistence. This persistence uses a couple of configurations to create and use a directory for persistance example : "
| persist-dir = /tmp/myQueue
| roll-cycle = xlarge_daily
| wire-type = compressed_binary
| block-size = 80m"

The problem in fact is that even if I delete the directory /tmp/myQueue the process still running without given me any error about disk persistence.
So thats the point of my doutbts:

  1. The persistance still wortking ? Yes ? So, where is the data ?
  2. The persistance should not given me an error about the missing directory or permissions change ?
Greg Silin


We're using Squbs unicomplex. Specifically, I'm wiring a service that plugs in to RouteDefinition and wanted to see if there was a reasonable way to mix it with dependency injection

    class-name = com.example.MyRoutesClass
    web-context = "" 
    listeners = [my-listener]

and then the router:

class MyRoutesClass extends RouteDefinition {
  // this won't work as a parameter b/c Squbs won't know what to do with it.
  val someDependency: DependencyService = ??? 

  override def route = // my routes

class DependencyService( // constructor with some other dependencies)

From what I see Squbs will auto instantiate that class as part of its bootstrap process. What's the recommended way to inject a dependency into my router? I can probably use Akka extension.. or the alternative is I don't have Squbs manage my routes lifecycle, but I feel that is also suboptimal. Curious to see if there is a hook up point I'm missing or if there is really no clean way to do what I am trying to.

THank you!