You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Make no mistake , you are now good to connect to the solace message router.
// import the session package and rename it if neededimport{SessionasSolaceSession}from'redux-solace';function*createOneSolaceSession(){conststate=yieldselect(getSession);yieldput(SolaceSession.actions.createAndConnectSession({hostUrl:state.newSessionHostUrl,vpn:state.newSessionVpn,username:state.newSessionUsername,sessionCache:state.newSessionCache,pass:state.newSessionPass,config:{usePerMsgAck:state.newSessionUsePerMsgAck,}}))}exportdefaultfunction*(){yieldtakeLatest(SESSION_SUBMIT_NEW,createOneSolaceSession);}
import{SessionasSolaceSession}from'redux-solace';function*handleSolaceSessionResponse(action){// if there were any errors while creating the session, the action.error would be the error objif(!action.error){yieldput(applicationNewSnackbar({message:`${action.payload.result.name} created`}))}}exportdefaultfunction*(){yieldtakeLatest(SolaceSession.actions.CREATE_AND_CONNECT_SESSION_RES,handleSolaceSessionResponse);}
or aSOLACE_CONTEXT_CHANGED action will be also emitted if sessions changed
A benchmark pressure test has been conducted along with a original solution using delegate server connecting solace router via websocket(socket.io).The conclusion is, using redux-solace will be 10-30ms slower on average per message than original solution using delegate server,but redux-solace brings flexibility, avoids delegate sever preprocess or schema negotiation cross teams.