How can I use kafka to output the target image detected by pgie

I want to convert the image of each detection target into base64 format and output it to kafka. Is there a mature solution or example?Which plugin is recommended?

Hi,
Please install DeepStream SDK through SDKManager and refer to

deepstream_sdk_v4.0.2_jetson\sources\apps\sample_apps\deepstream-test4

The sample is the demonstration of uploading to kafka server.

I read the code of test4 and have some doubts. The code to connect msgbroker is like this (I changed some code order)

    gst_bin_add_many(GST_BIN(pipeline),
		source, h264parser, decoder, nvstreammux, pgie,
		nvvidconv, nvosd, tee, queue1, queue2, msgconv,
		msgbroker, sink, NULL);

	if (!gst_element_link_many(source, h264parser, decoder,nvstreammux,
		pgie, nvvidconv, nvosd, tee, NULL)) {
		g_printerr("Elements could not be linked. Exiting.\n");
		return -1;
	}

	GstPad *sink_pad = NULL;
	GstPad * tee_msg_pad;
	tee_msg_pad = gst_element_get_request_pad(tee, "src_%u");
	sink_pad = gst_element_get_static_pad(queue1, "sink");

	if (gst_pad_link(tee_msg_pad, sink_pad) != GST_PAD_LINK_OK) {
		g_printerr("Unable to link tee and message converter\n");
		gst_object_unref(sink_pad);
		return -1;
	}
	if (!gst_element_link_many(queue1, msgconv, msgbroker, NULL)) {
		g_printerr("Elements could not be linked. Exiting.\n");
		return -1;
	}
	gst_object_unref(sink_pad);


	GstPad * tee_render_pad;
	tee_render_pad = gst_element_get_request_pad(tee, "src_%u");
	sink_pad = gst_element_get_static_pad(queue2, "sink");
	if (gst_pad_link(tee_render_pad, sink_pad) != GST_PAD_LINK_OK) {
		g_printerr("Unable to link tee and render\n");
		gst_object_unref(sink_pad);
		return -1;
	}
	gst_object_unref(sink_pad);


	if (!gst_element_link(queue2, sink)) {
		g_printerr("Elements could not be linked. Exiting.\n");
		return -1;
	}

Does the code implement the following structure?
tee->queue1->msgconv->msgbroker
|
–> queue2->sink

my question is why the tee_msg_pad=gst_element_get_request_pad(tee, "src_%u") get the tee’s srcpad ,instead of in test1.c sinkpad = gst_element_get_request_pad (streammux, pad_name_sink); get the streammux’s sinkpad.
I have the same question about sink_pad = gst_element_get_static_pad (queue2, "sink");too.

Hi,
The architecture is described in developer guide. Pleease take a look.