File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,14 @@ def _get_channel(self, channel=None):
55
55
56
56
def get_publisher_client (self , ** kwargs ):
57
57
from google .cloud import pubsub
58
- kwargs ['channel' ] = self ._get_channel (kwargs .get ('channel' ))
58
+ from google .auth import credentials
59
+ kwargs ['client_options' ] = dict (api_endpoint = self .get_pubsub_emulator_host ())
60
+ kwargs ['credentials' ] = credentials .AnonymousCredentials ()
59
61
return pubsub .PublisherClient (** kwargs )
60
62
61
63
def get_subscriber_client (self , ** kwargs ):
62
64
from google .cloud import pubsub
63
- kwargs ['channel' ] = self ._get_channel (kwargs .get ('channel' ))
65
+ from google .auth import credentials
66
+ kwargs ['client_options' ] = dict (api_endpoint = self .get_pubsub_emulator_host ())
67
+ kwargs ['credentials' ] = credentials .AnonymousCredentials ()
64
68
return pubsub .SubscriberClient (** kwargs )
You can’t perform that action at this time.
0 commit comments