On Mon, 2021-04-19 at 10:37 -0700, 'hong...@google.com' via golang-nuts
wrote:
> Is it possible for you to paste your yaml config file? At first
> glance, nothing seems to be out of the ordinary, but I'd like to try
> with the same configuration that you have to see if I missed
> anything.

Thanks, Alex.

I resolved the issue.

There were two parts:

1. As you surmise there was an typo in the config.

2. The topic was obtained in the subscriber using new topic creation
`client.CreateTopic(ctx, topic)` rather than getting a topic reference
`client.Topic(topic)` which I see now is incorrect (thought which is
poorly explained in the documentation).

The typo meant that when I did stumble onto the correct solution in the
code, it still didn't work and the paradoxical behaviour of the python
creation working for Go but not the other way around left me
bewildered.

I solved the issue by porting the pubsub cmdline[1] example that exists
in v0.1.0 to the current release, v1.10.2, and seeing how it is done
there. Some of the features appear to have been removed, but it is
largely intact here[2].

By way of comment on the documentation examples, in the Go client code
they are fragments without context, which makes them pretty poor
learning material; having something like the cmdline example ties
things together, so it's odd that it was dropped. I'm happy to donate
the port back if you feel it's helpful to have.

Dan

[1]https://pkg.go.dev/google.golang.org/cloud/examples/pubsub/cmdline
[2]https://github.com/kortschak/pubsub


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ebb300d3797bed0663858d34c385744fef510234.camel%40kortschak.io.

Reply via email to