alpakka icon indicating copy to clipboard operation
alpakka copied to clipboard

Google pubSub Grpc. Impl PublishWithContext and make subscriber and publisher accessible

Open bc-tayvs opened this issue 1 year ago • 1 comments

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

  1. Introduce publishWithContext method
  2. 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.

bc-tayvs avatar Jul 12 '22 21:07 bc-tayvs

@raboof @ennru @patriknw plz take a look

bc-tayvs avatar Jul 12 '22 21:07 bc-tayvs