Giter Site home page Giter Site logo

springkafkamessaging's Introduction

Spring-Kafka Messaging app for End Point blog series: https://www.endpointdev.com/blog/tags/spring-kafka-series

Example curl commands

activation

curl -H "Content-Type: application/json" -X POST localhost:8080/api/auth/getcode -d '{ "mobile": "01234" }'

login and get access-token

curl -H "Content-Type: application/json" -X POST localhost:8080/api/auth/login -d '{ "mobile": "01234", "activationCode": "309652" }'

send message REST example

curl -H "Content-Type: application/json" -X POST localhost:8080/api/message/send-message -d '{ "accessToken": "5eab27f8-8748-4fdc-a4de-ac782ce17a74", "sendTo": 5, "msg": "test message" }'

Websocket web UI example is now available.

Messaging example web UI

springkafkamessaging's People

Contributors

ashemez avatar

Stargazers

SuperSwanz avatar suyeon avatar keyu4work avatar jamilxt avatar Yehor avatar Richard William avatar  avatar  avatar Melih Düzgün avatar Isaque Souza avatar Gharm Alhajy avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

springkafkamessaging's Issues

when checking multiple receive user

Hello. Thank you for your working.
With your working, I have many knowledge about kafka.

When I check multiple receive user and send message, some user can't receive message.
So I suggest some fix code.

`

//in app.js
function loadContacts() {

// add class cbox for getting multiple checked
$("#contactlist").append('<input type="checkbox" id="sendTo" class="cbox" value="' + ...

}

`

`

// modify for multiple checked user
function sendData() {

var cboxs = $('.cbox:checkbox:checked');

if (cboxs != null) {
	var len = cboxs.length;
	for (var i =0; i < len ; i++) {
		
		var cbox = cboxs[i];			
		var sendTo = cbox.value;			
		var data = JSON.stringify({
		  'topic': 'SEND_MESSAGE',
		  'message': {
		    'accessToken': $("#accessToken").val(),
		    'sendTo': sendTo,
		    'msg': $("#messageArea").val(),
		  }
		})
		ws.send(data);	
	}
	
}

}
`

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.