At Gitter we use Faye extensibly to publish real-time messages regarding user and room activity to all our clients.

What is Faye?

Faye is a publish-subscribe messaging system based on the Bayeux protocol.

Learn more: Faye


We provide Faye endpoints that look like our REST API. When a user subscribes to them, she will receive real-time activity regarding those resources:

A user can subscribe to the following endpoints:

  • /api/v1/user/:userId/rooms
  • /api/v1/user/:userId/rooms/:roomId/unreadItems
  • /api/v1/user/:userId
  • /api/v1/rooms/:roomId: Room user presence.
  • /api/v1/rooms/:roomId/chatMessages: Room messages.
  • /api/v1/rooms/:roomId/users: Room users.
  • /api/v1/rooms/:roomId/events: Room events.
  • /api/v1/rooms/:roomId/chatMessages/:messageId/readBy

Consuming messages

To consume messages from Faye you'll need to use one of the provided clients.

Get the packages.

Publishing messages

We don't currently support publishing messages from your client to the server. For that purpose you should use our REST API.


Node.js client

You can find an example client at https://github.com/gitterHQ/gitter-faye-client.