   (alter-var-root #'*pipeline*     (constantly (core/make-samsara-processor config)))
   (alter-var-root #'*raw-pipeline* (constantly (make-raw-pipeline config)))
   (alter-var-root #'*config*       (constantly config))
-  (alter-var-root #'*store*        (constantly (atom (kv/make-in-memory-kvstore))))
+  (alter-var-root #'*store*        (constantly (thread-local (kv/make-in-memory-kvstore))))
   (display-samza-config (:topics config)))
 
 

    ;; other messages are processed by the normal pipeline, however here
    ;; we need to emit the state messages as well.

    ;;          |     this not really true when
    ;;          V     multiple threads running in same vm
    (let [state @*store*
          [new-state rich-events] (pipeline state message)
          txlog     (kv/tx-log new-state)
          txlog-msg (tx-log->messages txlog)


      ;; flushing tx-log
      (let [new-state' (kv/flush-tx-log new-state txlog)]
        (var-set *store* new-state')))))



