


However, experience has shown that these implementations carried several drawbacks: There have been several push notification implementations by mobile XMPP client vendors. Typically, these notifications are delivered to a user's mobile device, displaying a notice that can trigger opening an XMPP client to continue a conversation or answer a Jingle session request. The purpose of push notifications is to inform users of new messages or other pertinent information even when they have no XMPP clients online. Mapping the General Architecture to XMPP.General Architecture of a Push Notification Service.
#EJABBERD PUSH NOTIFICATION FULL#
You can read the full code on Github: base-client.go.

You can just use your standard Sarama code. The consumerLoop has nothing special regarding TLS authentication. Here is the relevant code: func NewTLSConfig(clientCertFile, clientKeyFile, caCertFile string) (*tls.Config, error) To connect to the server and authenticate with TLS, you just need to generate the proper TLSConfig. You can then convert your client keystore to be usable from Go, with similar commands: $ keytool -importkeystore -srckeystore -destkeystore client.p12 -deststoretype PKCS12 $ openssl pkcs12 -in client.p12 -nokeys -out $ openssl pkcs12 -in client.p12 -nodes -nocerts -out Go client supporting authentication

Here are the commands to extract the Certificate Authority (CA) certificate: $ keytool -importkeystore -srckeystore -destkeystore server.p12 -deststoretype PKCS12 $ openssl pkcs12 -in server.p12 -nokeys -out The first steps to easily handle your certificates from Go is to convert them to a set of PEM files. If you are managing your own Kafka service and would like to enable authentication, you should read this article from Confluent documentation site: Encryption and Authentication using SSL. Configuring your Kafka server to support authentication This article outlines the needed steps to configure it properly. If you want to access a Kafka server that have enabled TLS, you will need to be able to use certificate to connect from your Sarama / Go client.
