alpakka
alpakka copied to clipboard
Google pubSub Grpc. Impl PublishWithContext and make subscriber and publisher accessible
Short description
Publish with context
https://github.com/akka/alpakka/blob/d27748d1c1f29ae3b9e93f20d769109bd90bc60a/google-cloud-pub-sub-grpc/src/main/scala/akka/stream/alpakka/googlecloud/pubsub/grpc/scaladsl/GooglePubSub.scala#L28
publish method is not enough when you need to propagate context. FlowWithContext variant also needed.
Subscriber and publisher accessibillity
When you need custom publish
flow, subscriber and publisher will be very useful
https://github.com/akka/alpakka/blob/d27748d1c1f29ae3b9e93f20d769109bd90bc60a/google-cloud-pub-sub-grpc/src/main/scala/akka/stream/alpakka/googlecloud/pubsub/grpc/scaladsl/GooglePubSub.scala#L130
https://github.com/akka/alpakka/blob/d27748d1c1f29ae3b9e93f20d769109bd90bc60a/google-cloud-pub-sub-grpc/src/main/scala/akka/stream/alpakka/googlecloud/pubsub/grpc/scaladsl/GooglePubSub.scala#L136
Details
I made PR with small changes
- Introduce publishWithContext method
- Made subscriber and publisher package private. In case when you need custom approach or just client
Explain your idea in more detail and possibly suggest different ways to achieve it.
@raboof @ennru @patriknw plz take a look