Skip to content

Go implementation that allows you to mount a messaging service to send any notification.

Notifications You must be signed in to change notification settings

blue-factory/messages-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Messages Core

Go implementation that allows you to mount a messaging service to send notifications such as: email, sms, iot, push and hooks. The service has a planner who, through the grpc protocol, can place, update or cancel the sending of notifications.

Services Architecture

Architecture of microservices

Channels

Corresponds to the type of message that could be sent, for this there must be the implementation of that channel. There are currently several channels available to use, some are Email, SMS, IoT, Push and Hook.

The channel corresponds to an attribute of message, therefore, the name will be the unique key to identify the type of channel.

Providers

The provider corresponds and attribute of channel and allows to identify what types of messages are available for a specific channel.

For example, for the Email Channel there are the providers of Sendgrid, Mandrill and AWS SES. To know more, you must enter the repositories associated with the channels.

gRPC Service

message Message {
  string id = 1;
  string channel = 2;
  string provider = 3;
  string content = 4;
  string status = 5;
}

message Channel {
  string name = 1;
  repeated Provider providers = 2;
  string host = 3;
  string port = 4;
}

message Provider {
  string name = 1;
  map<string, string> params = 2;
}

service MessageService {
  rpc Put(MessagePutRequest) returns (MessagePutResponse) {}
  rpc Get(MessageGetRequest) returns (MessageGetResponse) {}
  rpc Update(MessageUpdateRequest) returns (MessageUpdateResponse) {}
  rpc Cancel(MessageCancelRequest) returns (MessageCancelResponse) {}
}

Client

If you are already using Messages APIs we recommend you to use the client in go. [Link]

TODO

  • Catch errors inside Schedulersend(id ulid.ULID) method and push on pq again adding X seconds to delivery time.

About

Go implementation that allows you to mount a messaging service to send any notification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published