Categorygithub.com/st-tech/fluent-bit-pubsub-custom
modulepackage
0.0.0-20250103034537-f12110d627c3
Repository: https://github.com/st-tech/fluent-bit-pubsub-custom.git
Documentation: pkg.go.dev

# README

fluent-bit output plugin for google pubsub

license Go Report Card

This plugin is used to publish data to queue in google pubsub.

You could easily use it.

Build

A bin directory already has been made binaries for mac, linux.

If you should directly make binaries for mac, linux

# local machine binary
$ make local-build

# Your machine is mac, and if you should do to retry cross compiling for linux.
# A command in below is required a docker.  
$ make build-linux

Usage

configuration options for fluent-bit.conf

KeyDescriptionDefault
ProjectGoogle Cloud project IDNONE(required)
TopicGoogle Cloud Pub/Sub topic nameNONE(required)
FormatThe type of message to be sent to pubsub. Currently, only json is supported.NONE(optional)
AttributesJSON string specifying message attributesNONE(optional)
DebugPrint debug logFalse(optional)
TimeoutThe maximum time that the client will attempt to publish a bundle of messages. (millsecond)60000(optional)
DelayThresholdPublish a non-empty batch after this delay has passed. (millsecond)1
ByteThresholdPublish a batch when its size in bytes reaches this value.1000000(optional)
CountThresholdPublish a batch when it has been reached count of messages.100(optional)
BufferedByteLimitThe maximum number of bytes that the client will buffer before the messages are sent to Pub/Sub.(byte)10000000(optional)

Example fluent-bit.conf

[Output]
    Name pubsub
    Match *
    Project your-project(custom)
    Topic your-topic-name(custom)
    Format json
    Attributes {"key1":"value1","key2":"value2"} 

Example exec

$ fluent-bit -c [your config file] -e pubsub.so 

# Functions

No description provided by the author

# Structs

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author