Skip to content

feat: eliminate Go sidecar, send gRPC events directly to webhook plugin#113

Draft
VivekPipaliya23 wants to merge 3 commits into
mainfrom
feat/eliminate-go-sidecar-direct-grpc
Draft

feat: eliminate Go sidecar, send gRPC events directly to webhook plugin#113
VivekPipaliya23 wants to merge 3 commits into
mainfrom
feat/eliminate-go-sidecar-direct-grpc

Conversation

@VivekPipaliya23

Copy link
Copy Markdown

Replace the vernemq-events-sidecar Go service (TCP protobuf → gRPC translator) with direct gRPC calls from the Erlang plugin to the webhook plugin using emqx/grpc-erl. This removes a network hop and an entire service from the deployment, while keeping the webhook plugin unchanged.

Key changes:

  • Replace shackle TCP client with grpc-erl gRPC client (grpc_client:unary/4)
  • Add full webhook service proto (PluginService.Event) to vmq_proto
  • Send user-type as gRPC metadata header instead of sidecar config
  • Fire-and-forget via spawn/1 around synchronous gRPC call
  • Update config schema: grpc_endpoint, grpc_port, grpc_pool_size, grpc_timeout, user_type replace hostname, port, pool_size, backlog_size
  • Rewrite test infrastructure: gRPC server handler replaces TCP server

Proposed Changes

Please describe the big picture of your changes here to communicate to the
VerneMQ team why we should accept this pull request. If it fixes a bug or
resolves a feature request, be sure to link to that issue.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes issue #XXXX)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, styles...)
  • DevOps (Build scripts, pipelines...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CODE_OF_CONDUCT.md document
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if needed)
  • Any dependent changes have been merged and published in related repositories
  • I have updated changelog (At the bottom of the release version)
  • I have squashed all my commits into one before merging

Further Comments

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.

Replace the vernemq-events-sidecar Go service (TCP protobuf → gRPC translator)
with direct gRPC calls from the Erlang plugin to the webhook plugin using
emqx/grpc-erl. This removes a network hop and an entire service from the
deployment, while keeping the webhook plugin unchanged.

Key changes:
- Replace shackle TCP client with grpc-erl gRPC client (grpc_client:unary/4)
- Add full webhook service proto (PluginService.Event) to vmq_proto
- Send user-type as gRPC metadata header instead of sidecar config
- Fire-and-forget via spawn/1 around synchronous gRPC call
- Update config schema: grpc_endpoint, grpc_port, grpc_pool_size,
  grpc_timeout, user_type replace hostname, port, pool_size, backlog_size
- Rewrite test infrastructure: gRPC server handler replaces TCP server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@VivekPipaliya23 VivekPipaliya23 self-assigned this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant