The Simplest Way to Make Teamcity and Zeromq Work Like They Should
You pair teamcity and zeromq to send fast build events to worker nodes. This setup lets build agents trigger tests and deploy apps over sockets. TeamCity manages your builds and runs your test scripts on schedule. ZeroMQ moves small messages between services with very low delay. When you link them, your build steps can talk to outside workers right away. You do not need to wait for slow web hooks or heavy message queues. How data and roles flow in teamcity and zeromq In a standard setup, a T
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You pair teamcity and zeromq to send fast build events to worker nodes. This setup lets build agents trigger tests and deploy apps over sockets.
TeamCity manages your builds and runs your test scripts on schedule. ZeroMQ moves small messages between services with very low delay. When you link them, your build steps can talk to outside workers right away. You do not need to wait for slow web hooks or heavy message queues.
How data and roles flow in teamcity and zeromq
In a standard setup, a TeamCity build agent runs a custom build step. That step opens a socket and sends a message to a listener app. The message often holds the build number, branch name, and test status. Remote test runners or deploy tools read that socket and start their jobs.
ZeroMQ does not check user roles out of the box on plain sockets. You must turn on curve keys to check who sends each message. TeamCity stores the secret key in its secret store for the project. When a build starts, the agent loads that key into memory for the run.
The listener checks the public key of the build agent before reading data. This step stops stray apps on the network from faking a build event. You should give each project its own key pair to keep teams apart. If a build payload holds emails or phone numbers, masking rewrites matched fields in results.
Common failure modes and how to scope network paths
Many teams make the mistake of sharing one key across all build agents. When one test job leaks that key, anyone can send fake deploy tasks. Other teams open wide network ports so any host can reach the listener. This choice leaves your test workers open to rogue traffic from any machine.
Unlogged socket messages also create big blind spots during a system outage. Because ZeroMQ runs without a central server, messages go straight from peer to peer. If a build triggers a bad deploy, you have no log of the payload. Teams then waste hours trying to guess which build agent sent the command.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, scope your network paths down to single host addresses. Put your build agents on a private subnet with strict firewall rules. Only allow the exact ports needed for the socket talk between known hosts. Rotate the curve keys for each project every few weeks to limit risk.
Keeping build queues fast and safe
Socket queues in memory can fill up fast when many builds run at once. If a downstream worker crashes, the build agent might hang while waiting to send. You should set clear time limits on every socket call in your build scripts. When a listener does not answer in time, the build step should fail fast.
This pattern keeps your build agents free for other teams and projects. You also want to log the start and end of every socket task. Write the target host, time, and build ID to a central log store. Good logs help your team spot slow workers before the whole build queue stalls.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How does TeamCity send messages to a ZeroMQ socket?
A build step runs a small script or plugin on the build agent. That script opens a socket, sends the build data, and closes the link.
How do we secure socket traffic between build agents and workers?
Use built-in curve encryption keys on all sockets and restrict network ports. Store the private keys inside the project secret store so scripts can load them.
What happens if a ZeroMQ listener goes down during a build?
Without a timeout, the build agent can hang or drop the message in memory. Set a short socket timeout in your script so the build fails cleanly.
Related guides
In this post