Giter VIP home page Giter VIP logo

camel-google-cloud-messaging's Introduction

Camel Google Cloud Messaging

This project implements a Google Cloud Messaging component for Apache Camel.

Usage

from("direct:foo").to("gcm:/topics/bar?apiKey=AIz...");

Configuration

  • apiKey
  • collapseKey
  • timeToLive - defaults to 3
  • delayWhileIdle
  • restrictedPackageName
  • dryRun
  • retries - defaults to 0 (no retries)
  • stringBodyDataKey - data key for string message bodies, defaults to message

Supported headers

  • to - recipient of the message, optional. If absent, defaults to the name of the endpoint (/topics/bar for gcm:/topics/bar?apiKey=AIz...).

Supported body types

  • If message body is a string, it will be sent in the data as <stringBodyDataKey>:<body>.
  • Otherwise message body will be interpreted as a map and sent in the data as key-value pair, with both keys and values converted to strings.

Body examples

Body "myMessage" will be sent as:

{
  "data" : {
    "message" : "myMessage"
  }
}

The following body:

final Map<String, String> body = new HashMap<String, String>();
body.put("facilityEquipmentnumber", "10213788");
body.put("stationName", "Arnstadt Hbf");
body.put("facilityDescription", "Aufzug zu Bstg 2/3");
body.put("facilityState", "INACTIVE");

Will be sent as:

{
  "data" : {
    "facilityEquipmentnumber" : "10213788",
    "stationName" : "Arnstadt",
    "facilityDescription" : "Aufzug zu Bstg 2/3",
    "facilityState" : "INACTIVE"
  }
}

camel-google-cloud-messaging's People

Contributors

highsource avatar

Watchers

Christian T avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.