Own Your Tracks... MQTT to Pulsar from Phones
Published: 2022-03-28 14:26:31

---
title: Own Your Tracks... MQTT to Pulsar from Phones
published: true
date: 2022-03-28 14:26:00 UTC
tags: 
canonical_url: 
---

# OwnTracks to Apache Pulsar

OwnTracks is a cool and open source app for iphone and android phones for sending out location data to a server of your request.  You can send HTTP or MQTT.   Let's pick MQTT and send it to our Pulsar server.

  

## For a no code ingest of Location Data

## [<svg aria-hidden="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z" fill-rule="evenodd"></path></svg>](https://github.com/tspannhw/FLiP-OwnTracks-MQTT#maps-of-travel)Maps of Travel

[![Map](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/raw/main/ownmap.png?raw=true)](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/blob/main/ownmap.png?raw=true) [![Map 2](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/raw/main/ownmap2.png?raw=true)](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/blob/main/ownmap2.png?raw=true)

## [<svg aria-hidden="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z" fill-rule="evenodd"></path></svg>](https://github.com/tspannhw/FLiP-OwnTracks-MQTT#configure-mqtt-settings)Configure MQTT Settings

[![image](https://user-images.githubusercontent.com/18673814/158393441-1b97742d-fb65-41aa-b864-7de92e5f93a2.png)](https://user-images.githubusercontent.com/18673814/158393441-1b97742d-fb65-41aa-b864-7de92e5f93a2.png) [![image](https://user-images.githubusercontent.com/18673814/158393504-74aeac76-4a87-431c-b63b-d0f9a29bbcb1.png)](https://user-images.githubusercontent.com/18673814/158393504-74aeac76-4a87-431c-b63b-d0f9a29bbcb1.png) [![image](https://user-images.githubusercontent.com/18673814/158393539-0e3a6a8e-733b-4b51-a77e-55ab5ce82e1a.png)](https://user-images.githubusercontent.com/18673814/158393539-0e3a6a8e-733b-4b51-a77e-55ab5ce82e1a.png) [![image](https://user-images.githubusercontent.com/18673814/158393590-ad3eadcb-8917-4d42-a956-cfca365763f1.png)](https://user-images.githubusercontent.com/18673814/158393590-ad3eadcb-8917-4d42-a956-cfca365763f1.png)

[![MQTT Settings](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/raw/main/ownmqtt.png?raw=true)](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/blob/main/ownmqtt.png?raw=true)

## [<svg aria-hidden="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z" fill-rule="evenodd"></path></svg>](https://github.com/tspannhw/FLiP-OwnTracks-MQTT#runs)Runs

```
"persistent://public/default/owntracks%2Fuser%2FB692CBD1-57AF-47EE-BD04-5CB3CBC20755"root@pulsar1:/opt/demo/apache-pulsar-2.9.1# bin/pulsar-client consume "persistent://public/default/owntracks%2Fuser%2FB692CBD1-57AF-47EE-BD04-5CB3CBC20755" -s "owntrax" -n 02022-03-09T19:02:43,397-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xe2958283, L:/127.0.0.1:37880 - R:localhost/127.0.0.1:6650]] Connected to server2022-03-09T19:02:43,574-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConsumerStatsRecorderImpl - Starting Pulsar consumer status recorder with config: {"topicNames":["persistent://public/default/owntracks%2Fuser%2FB692CBD1-57AF-47EE-BD04-5CB3CBC20755"],"topicsPattern":null,"subscriptionName":"owntrax","subscriptionType":"Exclusive","subscriptionMode":"Durable","receiverQueueSize":1000,"acknowledgementsGroupTimeMicros":100000,"negativeAckRedeliveryDelayMicros":60000000,"maxTotalReceiverQueueSizeAcrossPartitions":50000,"consumerName":null,"ackTimeoutMillis":0,"tickDurationMillis":1000,"priorityLevel":0,"maxPendingChunkedMessage":10,"autoAckOldestChunkedMessageOnQueueFull":false,"expireTimeOfIncompleteChunkedMessageMillis":60000,"cryptoFailureAction":"FAIL","properties":{},"readCompacted":false,"subscriptionInitialPosition":"Latest","patternAutoDiscoveryPeriod":60,"regexSubscriptionMode":"PersistentOnly","deadLetterPolicy":null,"retryEnable":false,"autoUpdatePartitions":true,"autoUpdatePartitionsIntervalSeconds":60,"replicateSubscriptionState":false,"resetIncludeHead":false,"keySharedPolicy":null,"batchIndexAckEnabled":false,"ackReceiptEnabled":false,"poolMessages":true,"maxPendingChuckedMessage":10}2022-03-09T19:02:43,605-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConsumerStatsRecorderImpl - Pulsar client config: {"serviceUrl":"pulsar://localhost:6650/","authPluginClassName":null,"authParams":null,"authParamMap":null,"operationTimeoutMs":30000,"lookupTimeoutMs":30000,"statsIntervalSeconds":60,"numIoThreads":1,"numListenerThreads":1,"connectionsPerBroker":1,"useTcpNoDelay":true,"useTls":false,"tlsTrustCertsFilePath":"","tlsAllowInsecureConnection":false,"tlsHostnameVerificationEnable":false,"concurrentLookupRequest":5000,"maxLookupRequest":50000,"maxLookupRedirects":20,"maxNumberOfRejectedRequestPerConnection":50,"keepAliveIntervalSeconds":30,"connectionTimeoutMs":10000,"requestTimeoutMs":60000,"initialBackoffIntervalNanos":100000000,"maxBackoffIntervalNanos":60000000000,"enableBusyWait":false,"listenerName":null,"useKeyStoreTls":false,"sslProvider":null,"tlsTrustStoreType":"JKS","tlsTrustStorePath":"","tlsTrustStorePassword":"","tlsCiphers":[],"tlsProtocols":[],"memoryLimitBytes":0,"proxyServiceUrl":null,"proxyProtocol":null,"enableTransaction":false,"socks5ProxyAddress":null,"socks5ProxyUsername":null,"socks5ProxyPassword":null}2022-03-09T19:02:43,627-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x2b93a0e0, L:/127.0.0.1:37882 - R:localhost/127.0.0.1:6650]] Connected to server2022-03-09T19:02:43,627-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0x2b93a0e0, L:/127.0.0.1:37882 - R:localhost/127.0.0.1:6650] Connected through proxy to target broker at 127.0.0.1:66502022-03-09T19:02:43,629-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConsumerImpl - [persistent://public/default/owntracks%2Fuser%2FB692CBD1-57AF-47EE-BD04-5CB3CBC20755][owntrax] Subscribing to topic on cnx [id: 0x2b93a0e0, L:/127.0.0.1:37882 - R:localhost/127.0.0.1:6650], consumerId 02022-03-09T19:02:43,641-0500 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConsumerImpl - [persistent://public/default/owntracks%2Fuser%2FB692CBD1-57AF-47EE-BD04-5CB3CBC20755][owntrax] Subscribed to topic on localhost/127.0.0.1:6650 -- consumer: 02022-03-09T19:02:45,645-0500 [pulsar-client-io-1-1] INFO com.scurrilous.circe.checksum.Crc32cIntChecksum - SSE4.2 CRC32C provider initialized----- got message -----key:[null], properties:[], content:{"_type":"location","acc":5,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","lat":40.268214,"lon":-74.529126,"m":2,"p":100.879,"SSID":"FiOS-QHW9R-5G","t":"u","tid":"55","tst":1646870566,"vac":3,"vel":0}----- got message -----key:[null], properties:[], content:{"_type":"location","acc":5,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","lat":40.268214,"lon":-74.529126,"m":2,"p":100.879,"SSID":"FiOS-QHW9R-5G","t":"u","tid":"55","tst":1646870568,"vac":3,"vel":0}----- got message -----key:[null], properties:[], content:{"_type":"location","acc":5,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","lat":40.268214,"lon":-74.529126,"m":2,"p":100.879,"SSID":"FiOS-QHW9R-5G","t":"u","tid":"55","tst":1646870570,"vac":3,"vel":0}----- got message -----key:[null], properties:[], content:{"_type":"location","acc":5,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","lat":40.268221,"lon":-74.529105,"m":2,"p":100.879,"SSID":"FiOS-QHW9R-5G","t":"u","tid":"55","tst":1646870576,"vac":3,"vel":1}----- got message -----key:[null], properties:[], content:{"_type":"location","acc":6,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","created_at":1646870585,"lat":40.268193,"lon":-74.529146,"m":2,"p":100.881,"SSID":"FiOS-QHW9R-5G","t":"t","tid":"55","tst":1646870404,"vac":2,"vel":1}2022-03-09T19:03:43,609-0500 [pulsar-timer-5-1] INFO org.apache.pulsar.client.impl.ConsumerStatsRecorderImpl - [persistent://public/default/owntracks%2Fuser%2FB692CBD1-57AF-47EE-BD04-5CB3CBC20755] [owntrax] [eb3ed] Prefetched messages: 0 --- Consume throughput received: 0.08 msgs/s --- 0.00 Mbit/s --- Ack sent rate: 0.08 ack/s --- Failed messages: 0 --- batch messages: 0 ---Failed acks: 0----- got message -----key:[null], properties:[], content:{"_type":"location","acc":5,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","lat":40.268171,"lon":-74.52908,"m":2,"p":100.886,"SSID":"FiOS-QHW9R-5G","t":"u","tid":"55","tst":1646870634,"vac":3,"vel":0}----- got message -----key:[null], properties:[], content:{"_type":"location","acc":5,"alt":35,"batt":92,"bs":2,"BSSID":"48:5d:36:cd:85:6a","conn":"w","lat":40.268186,"lon":-74.529093,"m":2,"p":100.889,"SSID":"FiOS-QHW9R-5G","t":"u","tid":"55","tst":1646870653,"vac":3,"vel":0}
```

## [<svg aria-hidden="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z" fill-rule="evenodd"></path></svg>](https://github.com/tspannhw/FLiP-OwnTracks-MQTT#not-map)Not Map

[![Cat](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/raw/main/ownmap3.jpeg?raw=true)](https://github.com/tspannhw/FLiP-OwnTracks-MQTT/blob/main/ownmap3.jpeg?raw=true)

  

### Source:  
 [https://github.com/tspannhw/FLiP-OwnTracks-MQTT](https://github.com/tspannhw/FLiP-OwnTracks-MQTT)