Comments (4)
// URLOpener opens Kafka URLs like "kafka://mytopic" for topics and
// "kafka://group?topic=mytopic" for subscriptions.
//
// For topics, the URL's host+path is used as the topic name.
// The default URL opener will connect to a default set of Kafka brokers based
// on the environment variable "KAFKA_BROKERS", expected to be a comma-delimited
// set of server addresses.
So, you shouldn't put the server hostname in the URL, put it (or them) in the KAFKA_BROKERS
environment variable.
from go-cloud.
i call pubsub.go OpenTopic with urlstr=kafka://locahost:9092/mytopic
,can't change url in kafka OpenTopicURL func
// OpenTopic opens the Topic identified by the URL given.
// See the URLOpener documentation in driver subpackages for
// details on supported URL formats, and https://gocloud.dev/concepts/urls
// for more information.
func OpenTopic(ctx context.Context, urlstr string) (*Topic, error) {
return defaultURLMux.OpenTopic(ctx, urlstr)
}
from go-cloud.
I do not understand the question. You should be calling with OpenTopic
with urlstr = kafka://mytopic
. The localhost:90902
, if that is where your Kafka broker is running, should be set in the environment variable.
from go-cloud.
Nail it, thanks!
from go-cloud.
Related Issues (20)
- docstore/gcpfirestore: ought to support non-default databases HOT 4
- S3 Blob Incompatibility with AWS S3 Issues? HOT 3
- docstore: should support (in) comparison operator HOT 3
- pubsub: support NATS jetstream HOT 1
- pubsub/awssnssqs: duplicate key in map literal HOT 3
- blob/s3: Add content length parameter in signing URL HOT 3
- pubsub/azuresb: support workload identity auth method HOT 3
- secrets/hashivault: read token from file HOT 3
- pubsub/azuresb: sending a message when unauthorized hangs HOT 1
- New Project: Docstore Query Gen for Go CDK HOT 1
- RabbitPubSub Queue Connection Closes Unexpectedly with FailedPrecondition Error HOT 2
- all: Request for new tag including 'Offset' feature in docstore HOT 1
- docstore/mongodocstore: Error update with only unset or increment modifier (recurring issue)
- pubsub/ AWS MSK Support HOT 6
- blob/s3blob: url encode CopySource
- docstore/awsdynamodb panics on iter.Next() HOT 15
- azblob: change in behaviour for falling back to `az login` credentials HOT 3
- blob/fileblob: Make it possible to set the permissions used in CreateDir
- blob/s3blob: nil pointer dereference for range reader error path HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-cloud.