Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

application.conf

akka{

extensions = [akka.persistence.Persistence]
persistence {
journal {
plugin = "akka.persistence.journal.leveldb"
auto-start-journals = ["akka.persistence.journal.leveldb"]
}
snapshot-store {
plugin = "akka.persistence.snapshot-store.local"
auto-start-snapshot-stores = ["akka.persistence.snapshot-store.local"]
}
}

}

Code Block
languagejava
themeEmacs
title의존설정(메이븐+akka conf)
collapsetrue
//메이븐 설정
		<dependency>
		  <groupId>com.typesafe.akka</groupId>
		  <artifactId>akka-persistence_2.12</artifactId>
		  <version>${akka.version}</version>
		</dependency>		  
		
		<dependency>
			<groupId>org.fusesource.leveldbjni</groupId>
  			<artifactId>leveldbjni-all</artifactId>
  			<version>1.8</version>  
		</dependency>




//Akka Persistence설정 : 다양한 복구옵션과 다양한 저장장치선택이 가능합니다. 여기서는 기본 local-disk 장치를 이용합니다.
akka{
	extensions = [akka.persistence.Persistence]
	  persistence {	  
	    journal {
	      plugin = "akka.persistence.journal.leveldb"
	      auto-start-journals = ["akka.persistence.journal.leveldb"]
	    }
	    snapshot-store {
	      plugin = "akka.persistence.snapshot-store.local"
	      auto-start-snapshot-stores = ["akka.persistence.snapshot-store.local"]
	    }	
	  }	
}

Expand
title의존설정
Code Block
languagejava
themeEmacs
class Msg implements Serializable {
  private static final long serialVersionUID = 1L;
  public final long deliveryId;
  public final String s;

  public Msg(long deliveryId, String s) {
    this.deliveryId = deliveryId;
    this.s = s;
  }
}

class Confirm implements Serializable {
  private static final long serialVersionUID = 1L;
  public final long deliveryId;

  public Confirm(long deliveryId) {
    this.deliveryId = deliveryId;
  }
}

class MsgSent implements Serializable {
  private static final long serialVersionUID = 1L;
  public final String s;

  public MsgSent(String s) {
    this.s = s;
  }
}
class MsgConfirmed implements Serializable {
  private static final long serialVersionUID = 1L;
  public final long deliveryId;

  public MsgConfirmed(long deliveryId) {
    this.deliveryId = deliveryId;
  }
}

...