Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in kafka subscriber #408

Open
ctsscott opened this issue Oct 13, 2018 · 0 comments
Open

Issue in kafka subscriber #408

ctsscott opened this issue Oct 13, 2018 · 0 comments

Comments

@ctsscott
Copy link

@ctsscott ctsscott commented Oct 13, 2018

Current behavior (how does the issue manifest):

When using flogo api, kafka sub with multiple handlers for different topics, will deliver same message from every topic to every handlerFunc.

Expected behavior:

Only messages for the specified handler topic should be delivered to the handler's handlerFunc.

Minimal steps to reproduce the problem (not required if feature enhancement):

Here is example code.

	app := flogo.NewApp()
	kafkaSettings := map[string]interface{}{
		"BrokerUrl": brokerUrl,
	}
	trg := app.NewTrigger(&kafkasub.KafkaSubTrigger{}, kafkaSettings)
	trg.NewFuncHandler(map[string]interface{}{"Topic": topic1}, HandleEvent1)
	trg.NewFuncHandler(map[string]interface{}{"Topic": topic2}, HandleEvent2)
	e, err := flogo.NewEngine(app)
	if err != nil {
		logger.Error(err)
		return
	}
	engine.RunEngine(e)

Messages delivered to topic1 will be sent to handlerFunc's HandleEvent1 and HandleEvent2.

Look at line 358 in the trigger.go for the subscriber.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants