Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

Storing Session State in NiFi

avatar

Can NiFi store current session state variables when being exposed as a web service using HandleHttpRequest-HandleHttpResponse?

Does the State Manager store state application or session wise?

1 ACCEPTED SOLUTION

avatar
Guru

You don't really have a session store in NiFi. However, it would be perfectly possible to create a session store using Cookies and the DistributedMapCacheService and associated processors. You would need to do this by having a flow that creates a session id and adds the Set-Cookie header to the response using dynamic properties on the HandleResponse processor. Use the contents from this as a key to then change and lookup session contents.

View solution in original post

1 REPLY 1

avatar
Guru

You don't really have a session store in NiFi. However, it would be perfectly possible to create a session store using Cookies and the DistributedMapCacheService and associated processors. You would need to do this by having a flow that creates a session id and adds the Set-Cookie header to the response using dynamic properties on the HandleResponse processor. Use the contents from this as a key to then change and lookup session contents.

Labels