Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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.