External Kafka queue, Roadrunner, Temporal workflows #1803
-
Hi, i'm new to temporal and roadrunner and having some issues with it. So there is two questions:
It will be excellent it there is example for such combo but i didn't found it here is rr.yaml and installed requirements with composer "require": {
"symfony/dotenv": "^6.2",
"symfony/console": "^6.3",
"php": ">=8.2.0",
"ext-curl": "*",
"spiral/roadrunner": "^2023.3",
"spiral/roadrunner-cli": "^2.5",
"spiral/roadrunner-worker": "^3.2",
"spiral/roadrunner-jobs": "^4.3",
"spiral/tokenizer": "^3.9",
"grpc/grpc": "^1.38",
"google/protobuf": "^3.25",
"jobcloud/php-kafka-lib": "^2.0",
"temporal/sdk": "2.7.x-dev",
"temporal/open-telemetry-interceptors": "dev-master",
"guzzlehttp/promises": "^2.0",
"php-http/httplug": "^2.4",
"nyholm/psr7": "^1.8",
"open-telemetry/transport-grpc": "^0.0.17",
"open-telemetry/exporter-otlp": "^0.0.17"
}, version: "3"
server:
relay: pipes
command: "php /app/app.php saga:consumer queue-name"
env:
- TEMPORAL_CLI_ADDRESS: temporal:7233
- RR_MODE: jobs
temporal:
address: temporal:7233
activities:
num_workers: 1
allocate_timeout: 3600s
command: "php /app/worker.php"
env:
RR_MODE: temporal
kafka:
brokers: ["kafka"]
jobs:
consume: ["kafka-messages"]
num_pollers: 1
pipeline_size: 1000
pool:
num_workers: 4
allocate_timeout: 1h
pipelines:
kafka-messages:
driver: kafka
config:
brokers: [ kafka:9092 ]
consumer_options:
topics: ["queue-name"]
group_options:
group_id: "test-consumer"
rpc:
listen: tcp://127.0.0.1:6001
logs:
mode: raw
output: stdout
err_output: stderr
encoding: json
server:
mode: raw
level: info
encoding: json
output: stdout
err_output: stderr
temporal:
mode: raw
level: info
encoding: json
output: stdout
err_output: stderr
rpc:
mode: raw
level: info
encoding: json
output: stdout
err_output: stderr |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hey @LeonidDereviankoCasafari 👋 kafka:
brokers: ["kafka:9092"] # Port should be used
|
Beta Was this translation helpful? Give feedback.
Got u 👍
You may read docs here.
Issues in your config:
RR_MODE
env variable. RR will set it automatically per pool of workers. By setting it to theRR_MODE: temporal
you overwriting mode set by RR for all pools.kafka
. First of all, there is nobrokers
key. Check that the topic exists on the kafka broker. Or useauto_create_topics_enable
pipeline option.Could you please rephrase, I'm not sure that I understand correctly…