rpk topic produce

An rpk command that reads lines from standard input and writes each one to a topic as a record.

In more detail

Pass --key (or -k) to set a record key and --partition to force a specific partition. In the course, text is piped in with echo and docker exec -i so the input reaches the command inside the container.

Example

echo login | docker exec -i broker rpk topic produce events --key u1

Related terms

Taught in

References