M2M & Telematics A market opportunity M2M System Telematics Consultants.
Page AirVantage M2M Cloud Data Push Introduction 1.
-
Upload
hubert-summers -
Category
Documents
-
view
214 -
download
2
Transcript of Page AirVantage M2M Cloud Data Push Introduction 1.
Page
AirVantage M2M CloudData Push Introduction
1
Page
• AMQP provides store-and-forward transactional messaging, high-performance publish and subscribe event notification mechanism
• It reliably delivers business value messages: we can absolutely trust AMQP to get the message to its destination once receipt is acknowledged by the transport
• Uses TCP for reliable delivery. AMQP connections use authentication and can be protected using TLS (SSL)
2
AMQP - Presentation
Sierra Wireless Proprietary and Confidential
Page 3
AirVantage Data Push API Principles
Sierra Wireless Proprietary and Confidential
Queue ConsumerPublish
M2M Cloud Platform
M2M Data
Storage
M2M Cloud API
3rd-Party
Hardware
Agent
Page 4
AirVantage Data Push API Principles (2)
Sierra Wireless Proprietary and Confidential
Connect
Message Check Ok
Close
Remove from QueueAcknowledge
Consume
M2M Cloud Platform
M2M Data
Storage
M2M Cloud API
Page 5
AirVantage Data Push API Principles (3)
Sierra Wireless Proprietary and Confidential
Connect
Acknowledge
Consume# 23
# 24
# 25Message Handling Error
# 26
# 25
M2M Cloud Platform
M2M Data
Storage
M2M Cloud API
Page 6
AirVantage Data Push API Principles (4)
Sierra Wireless Proprietary and Confidential
Connect
Acknowledge
Consume# 23
# 24
# 25Error
# 26
# 27
Reject
Consume
M2M Cloud Platform
M2M Data
Storage
M2M Cloud API
Page 7
AirVantage Data Push API Principles (5)
Sierra Wireless Proprietary and Confidential
Connect
Acknowledge
Consume# 24
# 25
# 26
# 25
Client error or crash
Connect
M2M Cloud Platform
M2M Data
Storage
M2M Cloud API
Page
• AMQP official site: http://www.amqp.org
• RabbitMQ (Vmware) site: http://www.rabbitmq.com/
• Clients and developer tools in Java, Ruby, Python, .NET: http://www.rabbitmq.com/devtools.html
8
AMQP - Resources
Sierra Wireless Proprietary and Confidential
Page
+++++++++++++++++RabbitMQConsumer.java+++++++++++++++++++++++++++import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.*;
public class RabbitMQConsumer
{
public static void main(String []args) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setUsername("guest");
factory.setPassword("guest");
factory.setVirtualHost("/");
factory.setHost("127.0.0.1");
factory.setPort(5672);
Connection conn = factory.newConnection();
Channel channel = conn.createChannel();
String exchangeName = “AirVantageDataPushAPI";
String queueName = “myAirVantageQueue";
String routingKey = “myRoute";
boolean durable = true;
9
Example code: RabbitMQConsumer.java
Sierra Wireless Proprietary and Confidential
Page
channel.exchangeDeclare(exchangeName, "direct", durable);
channel.queueDeclare(queueName, durable,false,false,null);
channel.queueBind(queueName, exchangeName, routingKey);
boolean noAck = false;
QueueingConsumer consumer = new QueueingConsumer(channel);
channel.basicConsume(queueName, noAck, consumer);
boolean runInfinite = true;
while (runInfinite) {
QueueingConsumer.Delivery delivery;
try { delivery = consumer.nextDelivery(); }
catch (InterruptedException ie) { continue; }
System.out.println("Message received" + new String(delivery.getBody()));
channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
}
channel.close();
conn.close(); }
}
10
RabbitMQConsumer.java (2)
Sierra Wireless Proprietary and Confidential