Skip to content

Consuming external Kafka topics/messages #1802

Answered by msmakouz
konigbach asked this question in Q&A
Discussion options

You must be logged in to vote

@konigbach Hi. Do you pass the job name in your service that pushes the job to the queue? The name does not necessarily have to be the class name, you can use any string.

And you can register a standalone handler for each topic. For example:

// app/config/queue.php
return [
    'registry' => [
        'handlers' => [
            'users' => App\Endpoint\Job\UsersJob::class,
             // ...
        ],
    ],
];

And push jobs specifying this name (instead of the class name). This is an example in PHP, but your Python service should have something similar.

$queue->push('users', ['name' => 'value']);

Replies: 3 comments 18 replies

Comment options

You must be logged in to vote
1 reply
@konigbach
Comment options

Comment options

You must be logged in to vote
16 replies
@msmakouz
Comment options

@TheLevti
Comment options

@rustatian
Comment options

@msmakouz
Comment options

@TheLevti
Comment options

Answer selected by rustatian
Comment options

You must be logged in to vote
1 reply
@rustatian
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
R-question Question
5 participants